Introduce the configuration and use of floating windows

Workflow integrationFloat a button on an application or web page and click it to send the page content to workflows such as n8n.

MultiplayerSuspend a multiplayer game and play the game with friends while chatting in the chat tool

Shortcut toolsFloating shortcut tools, such as opening apps, automating apps, and taking screenshots

More fun things are waiting for you to invent!

配置属性

WindowConf core properties

Description of the main configuration items of WindowConf

htmlConf
HtmlConf?

html configuration

floatWindowConf
FloatWindowConf?

Floating window configuration

windowId
string

The id of the floating window can be used to hide, display, close, etc. the floating window. The system will generate an id for it by default

forceDismissWindowTime
number

The time to force the window to close, the default is 0, if it is greater than 0, it will count down and force the window to close.

FloatWindowConf configuration

Specific configuration items for floating windows

floatConf
FloatConf?

Floating window configuration

foregroundText
string?

Front desk service. If there is a value, a front-end service will be started. After closing the floating window, the front-end service will be closed at the same time. After the front-end service is clicked, the floating window will be closed. This function can use the foreground service to close the floating window when the floating window takes up too much space and covers the button to close the floating window.

FloatConf detailed configuration

Detailed configuration items such as the position, dragging, and display mode of the floating window

positionSaveName
string?

Position save name, such as "${positionSaveName}", used to remember the position where the user dragged

draggable
boolean?

Whether it can be dragged

defaultX
number?

Default X coordinate

defaultY
number?

Default Y coordinate

resetX
number?

Reset X coordinate

resetY
number?

Reset Y coordinate

tag
string?

Label

sidePattern
FloatSidePattern?

Floating window welt mode

showPattern
FloatShowPattern?

Floating window display mode

hasEditText
boolean?

Whether to include EditText

gravity
GravityInfo?

Floating window alignment and coordinate offset

layoutChangedGravity
Gravity?

Alignment after layout size change

border
BorderInfo?

Dragging boundary values ​​(left, top, right, bottom)

matchParent
MatchParentInfo?

Whether the width and height fill the parent layout

BorderInfo border settings

Drag and drop boundary value configuration

left
number

left border

top
number

upper boundary

right
number

right border

bottom
number

lower boundary

MatchParentInfo layout configuration

Whether the width and height fill the parent layout

widthMatch
boolean

Match parent width

heightMatch
boolean

Match parent height

HtmlConf floating window HTML configuration

HTML content and related configuration loaded by floating window

url
string | null?

If it is in url format, use url. You must choose one of url and html

html
string | null?

If it is html format, use html format. You must choose one of url and html

jsBridgeName
string?

The name of the injected js. If not set, it will be injected into a unified Android

webViewJsParams
WebViewJsParams?

js configuration of webview

webViewConf
WebViewConf?

webview configuration

webViewJsName
string?

Injected webViewJs implementation version (default AutoWebViewJs), optional: WebViewJs, AutoWebViewJs

javaRunnerId
number?

The id of the executed script, which can be used to control window communication

extra
Record<any, any>?

The additional configuration passed to html is obtained by the opened html actively calling ${jsBridgeName}.onJsCallFun("extraConf","")

WebViewJsParams WebView JS configuration

JavaScript parameter configuration of WebView, used to control content size adaptation, data transfer, etc.

fitContentWidth
number?

-200 automatically matches the screen width, 0 automatically matches the web page width, and is greater than 0. Use this value to set the width.

fitContentHeight
number?

Same as fitContentWidth, used to control height

javaToJsDataString
string?

The data passed by webview to js can be obtained by js actively calling webview's method.

fitContentId
string?

Valid when fitContentWidth and fitContentHeight are set to 0, specify the DOM element ID to calculate the actual display width and height

fitContentClass
string?

Valid when fitContentWidth and fitContentHeight are set to 0, specify the DOM element class selector

fitContentJs
string?

Custom JavaScript script to obtain content width (security needs to be considered)

WebViewConf WebView configuration

Basic configuration of WebView, such as background color, User Agent, etc.

backgroundColor
number?

The background color of the webview. Use this color when html is transparent

ua
string?

Specific User Agent when loading