On this page
Api Overview
1.Basics
1.1、System capabilities
| Name | Function Description | Minimum version |
|---|---|---|
| canIuse | Determine whether the API, callback, parameters, components, etc. of the mini program are available in the current version. | 1.5.0 |
| env | Environment variables | 1.5.1 |
| base64ToArrayBuffer | Convert Base64 string to ArrayBuffer object | 1.5.1 |
| arrayBufferToBase64 | Convert ArrayBuffer object to Base64 string | 1.5.1 |
1.2、System
| Name | Function Description | Minimum version |
|---|---|---|
| getSystemInfo | Asynchronous call to get system information | 1.5.0 |
| getSystemInfoSync | Synchronous call to get system information | 1.5.1 |
| getSystemInfoAsync | Asynchronous get system information | 1.5.1 |
| getWindowInfo | Get window information | 1.5.1 |
| getSystemSetting | Get device settings | 1.5.0 |
| openSystemBluetoothSetting | Jump to system Bluetooth settings page | 1.5.1 |
| openAppAuthorizeSetting | Jump to system host client authorization management page. | 1.5.1 |
| getRendererUserAgent | Get the UserAgent of Webview applet. | 1.5.1 |
| getDeviceInfo | Get basic device information. | 1.5.1 |
| getAppBaseInfo | Get basic host client information | 1.5.1 |
| getAppAuthorizeSetting | Get host client authorization settings | 1.5.1 |
1.3、Update
| Name | Function Description | Minimum version |
|---|---|---|
| getUpdateManager | Get the globally unique version update manager for managing mini program updates. | 1.5.1 |
| UpdateManager.applyUpdate | Force mini program to restart and use the new version | 1.5.0 |
| UpdateManager.onCheckForUpdate | Listen for the event of requesting Luffa background to check update results | 1.5.0 |
| UpdateManager.onUpdateFailed | Listen for mini program update failure events | 1.5.0 |
| UpdateManager.onUpdateReady | Listen for mini program version update events | 1.5.0 |
1.4、Mini program
| Name | Function Description | Minimum version |
|---|---|---|
| getLaunchOptionsSync | Get the parameters when the mini program is started | 1.5.0 |
| getEnterOptionsSync | Get the parameters when the mini program is started this time | 1.5.1 |
| onError | Listen for mini program error events | 1.5.0 |
| offError | Remove the listener function for mini program error events | 1.5.0 |
| onThemeChange | Listen for system theme change events | 1.5.0 |
| offThemeChange | Remove the listener function for system theme change events | 1.5.0 |
| onPageNotFound | Listen for the event that the page to be opened by the mini program does not exist | 1.5.1 |
| offPageNotFound | Remove the listener function for the event that the page to be opened by the mini program does not exist | 1.5.1 |
| onAppShow | Listen for the mini program switching to the foreground event | 1.5.1 |
| offAppShow | Remove the listener function for the mini program switching to the foreground event | 1.5.1 |
| onAppHide | Listen for the mini program switching to the background event | 1.5.1 |
| offAppHide | Remove the listener function for the mini program switching to the foreground event | 1.5.1 |
| onUnhandledRejection | Listen for unhandled Promise rejection events | 1.5.1 |
| offUnhandledRejection | Remove the listener function for unhandled Promise rejection events | 1.5.1 |
1.5、Debug
| Name | Function Description | Minimum version |
|---|---|---|
| setEnableDebug | Set whether to turn on the debug switch | 1.5.0 |
| getLogManager | Get the log manager object | 1.5.1 |
| console.debug | Print debug logs to the debug panel | 1.5.0 |
| console.error | Print error logs to the debug panel | 1.5.0 |
| console.group | Create a new group in the debug panel | 1.5.0 |
| console.groupEnd | End the group created by console.group | 1.5.0 |
| console.info | Print info logs to the debug panel | 1.5.0 |
| console.log | Print log logs to the debug panel | 1.5.0 |
| console.warn | Print warn logs to the debug panel | 1.5.0 |
| LogManager.debug | Write debug logs | 1.5.0 |
| LogManager.info | Write info logs | 1.5.0 |
| LogManager.log | Write log logs | 1.5.0 |
| LogManager.warn | Write warn logs | 1.5.0 |
| RealtimeLogManager.addFilterMsg | Add filter keywords | 1.5.16 |
| RealtimeLogManager.error | Write error logs | 1.5.16 |
| RealtimeLogManager.getCurrentState | You can get the current cache remaining space | 1.5.16 |
| RealtimeLogManager.in | Set the page where the real-time log page parameter is located | 1.5.16 |
| RealtimeLogManager.info | Write info logs | 1.5.16 |
| RealtimeLogManager.setFilterMsg | Set filter keywords | 1.5.16 |
| RealtimeLogManager.warn | Write warn logs | 1.5.16 |
| RealtimeTagLogManageraddFilterMsg | Add filter keywords | 1.5.16 |
| RealtimeTagLogManager.error | Write error logs | 1.5.16 |
| RealtimeTagLogManager.info | Write info logs | 1.5.16 |
| RealtimeTagLogManager.setFilterMsg | Set filter keywords | 1.5.16 |
| RealtimeTagLogManager.warn | Write warn logs | 1.5.16 |
2、Routing
| Name | Function Description | Minimum version |
|---|---|---|
| switchTab | Jump to the tabBar page and close all other non-tabBar pages | 1.5.0 |
| reLaunch | Close all pages and open to a page in the application | 1.5.0 |
| redirectTo | Close the current page and jump to a page in the application | 1.5.0 |
| navigateTo | Keep the current page and jump to a page in the application | 1.5.1 |
| navigateBack | Close the current page and return to the previous page or multiple pages | 1.5.0 |
| EventChannel | Inter-page event communication channel | 1.5.1 |
3、Jump
| Name | Function Description | Minimum version |
|---|---|---|
| exitMiniProgram | Exit the current applet | 1.5.0 |
| navigateToMiniProgram | Open another applet | 1.5.0 |
| navigateBackMiniProgram | Return to the previous applet. The call can only be successful when the current applet is opened by another applet. | 1.5.1 |
4、Forwarding
| Name | Function Description | Minimum version |
|---|---|---|
| hideShareMenu | Hide the forward button of the current page | 1.5.0 |
| showShareMenu | Show the forward button of the current page | 1.5.0 |
| updateShareMenu | Update forwarding properties | 1.5.0 |
| showShareImageMenu | Open the share picture pop-up window | 1.5.35 |
| onCopyUrl | Listen for the event triggered when the user clicks the "Copy Link" button in the upper right corner menu | 1.5.35 |
| offCopyUrl | Remove all listener functions for the event triggered when the user clicks the "Copy Link" button in the upper right corner menu | 1.5.35 |
5、Interface
5.1、Interaction
| Name | Function Description | Minimum version |
|---|---|---|
| hideLoading | Hide the loading prompt box | 1.5.0 |
| hideToast | Hide the message prompt box | 1.5.0 |
| showActionSheet | Show the operation menu | 1.5.0 |
| showLoading | Show the loading prompt box | 1.5.0 |
| showModal | Show the modal dialog box | 1.5.0 |
| showToast | Show the message prompt box | 1.5.0 |
| enableAlertBeforeUnload | Open the applet page and return to the inquiry dialog box | 1.5.1 |
| disableAlertBeforeUnload | Close the applet page and return to the inquiry dialog box | 1.5.1 |
5.2、Navigation Bar
| Name | Function Description | Minimum version |
|---|---|---|
| setNavigationBarTitle | Dynamically set the title of the current page. | 1.5.0 |
| setNavigationBarColor | Set the color of the page navigation bar. | 1.5.0 |
| hideHomeButton | Hide the return to homepage button | 1.5.0 |
| showNavigationBarLoading | Display the navigation bar loading animation on the current page | 1.5.1 |
| hideNavigationBarLoading | Hide the navigation bar loading animation on the current page | 1.5.1 |
5.3、Background
| Name | Function Description | Minimum version |
|---|---|---|
| setBackgroundColor | Dynamically set the background color of the window | 1.5.0 |
| setBackgroundTextStyle | Dynamically set the drop-down background font and loading image style | 1.5.0 |
5.4、TabBar
| Name | Function Description | Minimum version |
|---|---|---|
| showTabBar | Display tabBar. | 1.5.0 |
| hideTabBar | Hide tabBar. | 1.5.0 |
| setTabBarStyle | Dynamically set the overall style of tabBar. | 1.5.0 |
| setTabBarItem | Dynamically set the content of a certain item of tabBar. From 2.7.0, images support temporary files and network files. | 1.5.0 |
| showTabBarRedDot | Display the red dot in the upper right corner of a certain item of tabBar. | 1.5.0 |
| hideTabBarRedDot | Hide the red dot in the upper right corner of a certain item of tabBar. | 1.5.0 |
| setTabBarBadge | Add text to the upper right corner of a certain item of tabBar. | 1.5.0 |
| removeTabBarBadge | Remove the text in the upper right corner of a certain item of tabBar. | 1.5.0 |
5.5、Pull Down To Refresh
| Name | Function Description | Minimum version |
|---|---|---|
| startPullDownRefresh | Start pull-down refresh. | 1.5.0 |
| stopPullDownRefresh | Stop the current page pull-down refresh. | 1.5.0 |
5.6、Scroll
| Name | Function Description | Minimum version |
|---|---|---|
| pageScrollTo | Scroll the page to the target position, support selector and scroll distance positioning. | 1.5.0 |
| ScrollViewContext.scrollIntoView | Scroll to the specified position. | 1.5.0 |
| ScrollViewContext.scrollTo | Scroll to the specified position. | 1.5.0 |
5.7、Animation
| Name | Function Description | Minimum version |
|---|---|---|
| createAnimation | Create an animation instance animation. | 1.5.0 |
| Animation.backgroundColor | Set the background color. | 1.5.0 |
| Animation.bottom | Set the bottom value. | 1.5.0 |
| Animation.export | Export animation queue. | 1.5.0 |
| Animation.height | Set height | 1.5.0 |
| Animation.left | Set the left value | 1.5.0 |
| Animation.matrix | Same as transform-function matrix | 1.5.0 |
| Animation.matrix3d | Same as transform-function matrix3d | 1.5.0 |
| Animation.opacity | Set transparency | 1.5.0 |
| Animation.right | Set right value | 1.5.0 |
| Animation.rotate | Rotate clockwise from origin by an angle | 1.5.0 |
| Animation.rotate3d | Rotate clockwise from fixed axis by an angle | 1.5.0 |
| Animation.rotateX | Rotate clockwise from X axis by an angle | 1.5.0 |
| Animation.rotateY | Rotate clockwise from Y axis by an angle | 1.5.0 |
| Animation.rotateZ | Rotate clockwise from Z axis by an angle | 1.5.0 |
| Animation.scale | Scale | 1.5.0 |
| Animation.scale3d | Scale | 1.5.0 |
| Animation.scaleX | Scale X axis | 1.5.0 |
| Animation.scaleY | Scale Y axis | 1.5.0 |
| Animation.scaleZ | Scale Z axis | 1.5.0 |
| Animation.skew | Tilt X and Y axis coordinates | 1.5.0 |
| Animation.skewX | Tilt X axis coordinates | 1.5.0 |
| Animation.skewY | Tilt Y axis coordinates | 1.5.0 |
| Animation.step | Indicates that a set of animations is completed | 1.5.0 |
| Animation.top | Set top value | 1.5.0 |
| Animation.translate | Translate transform | 1.5.0 |
| Animation.translate3d | Translate xyz coordinates | 1.5.0 |
| Animation.translateX | Translate X axis | 1.5.0 |
| Animation.translateY | Translate Y axis | 1.5.0 |
| Animation.translateZ | Translate Z axis | 1.5.0 |
| Animation.width | Set width | 1.5.0 |
5.8、Custom Components
| Name | Function Description | Minimum version |
|---|---|---|
| nextTick | Delay some operations to the next time slice | 1.5.0 |
5.9、Menu
| Name | Function Description | Minimum version |
|---|---|---|
| getMenuButtonBoundingClientRect | Get the layout position information of the menu button (the pill button in the upper right corner) | 1.5.0 |
5.10、Window
| Name | Function Description | Minimum version |
|---|---|---|
| onWindowResize | Listen to window size change events | 1.5.0 |
| offWindowResize | Remove the listener function for window size change events | 1.5.1 |
5.11、Font
| Name | Function Description | Minimum version |
|---|---|---|
| loadFontFace | Dynamically load network fonts | 1.5.0 |
6、Network
6.1、Initiate Request
| Name | Function Description | Minimum version |
|---|---|---|
| request | Initiate HTTPS network requests | 1.5.0 |
| RequestTask.abort | Interrupt request tasks | 1.5.0 |
| RequestTask.onChunkReceived | Listen to Transfer-Encoding Chunk Received events | 1.5.1 |
| RequestTask.offChunkReceived | Remove the listener function for Transfer-Encoding Chunk Received events | 1.5.1 |
| RequestTask.onHeadersReceived | Listen to HTTP Response Header events | 1.5.0 |
| RequestTask.offHeadersReceived | Remove the listener function for HTTP Response Header events | 1.5.0 |
6.2、Upload
| Name | Function Description | Minimum version |
|---|---|---|
| uploadFile | Upload local resources to the server | 1.5.0 |
| UploadTask.abort | Interrupt upload tasks | 1.5.0 |
| UploadTask.onProgressUpdate | Listen to upload progress change events | 1.5.0 |
| UploadTask.offProgressUpdate | Cancel listening to upload progress change events | 1.5.0 |
| UploadTask.onHeadersReceived | Listen to HTTP Response Header events | 1.5.0 |
| UploadTask.offHeadersReceived | Remove the listener function for HTTP Response Header events | 1.5.0 |
6.3、Download
| Name | Function Description | Minimum version |
|---|---|---|
| downloadFile | Download file resources to the local. The client directly initiates an HTTPS GET request and returns the local temporary path (local path) of the file. The maximum file allowed for a single download is 200MB | 1.5.1 |
| DownloadTask.abort | Interrupt download tasks | 1.5.1 |
| DownloadTask.onProgressUpdate | Listen to download progress change events | 1.5.1 |
| DownloadTask.offProgressUpdate | Remove the listener function for download progress change events | 1.5.1 |
| DownloadTask.onHeadersReceived | Listen for HTTP Response Header events | 1.5.1 |
| DownloadTask.offHeadersReceived | Remove the listener function for HTTP Response Header events | 1.5.1 |
6.4、WebSocket
| Name | Function Description | Minimum version |
|---|---|---|
| sendSocketMessage | Send data through WebSocket connection. You need to call wx.connectSocket first, and send after the wx.onSocketOpen callback | 1.5.1 |
| onSocketOpen | Listen for WebSocket connection opening events | 1.5.1 |
| onSocketMessage | Listen for WebSocket receiving server message events | 1.5.1 |
| onSocketError | Listen for WebSocket error events | 1.5.1 |
| onSocketClose | Listen for WebSocket connection closing events | 1.5.1 |
| connectSocket | Create a WebSocket connection | 1.5.1 |
| closeSocket | Close the WebSocket connection | 1.5.1 |
| SocketTask.close | Close the WebSocket connection | 1.5.0 |
| SocketTask.onClose | Listen for WebSocket connection closing events | 1.5.0 |
| SocketTask.onError | Listen for WebSocket error events | 1.5.0 |
| SocketTask.onMessage | Listen for WebSocket receiving server message events | 1.5.0 |
| SocketTask.onOpen | Listen for WebSocket connection opening events | 1.5.0 |
| SocketTask.send | Send data through WebSocket connection | 1.5.0 |
6.5、Udp Communication
| Name | Function Description | Minimum version |
|---|---|---|
| createUDPSocket | Create a UDP Socket instance | 1.5.1 |
| UDPSocket.bind | Bind an available port randomly assigned by the system, or bind a specified port number | 1.5.1 |
| UDPSocket.close | Close the UDP Socket instance | 1.5.1 |
| UDPSocket.connect | Pre-connect to the specified IP and port, and need to be used with the write method | 1.5.1 |
| UDPSocket.onClose | Listen for closing events. | 1.5.1 |
| UDPSocket.offClose | Remove the listener function for closing events. | 1.5.1 |
| UDPSocket.onError | Listen for error events. | 1.5.1 |
| UDPSocket.offError | Remove the listener function for error events. | 1.5.1 |
| UDPSocket.onListening | Listen for events that start listening for data packet messages. | 1.5.1 |
| UDPSocket.offListening | Remove the listener function for events that start listening for data packet messages. | 1.5.1 |
| UDPSocket.onMessage | Listen for events that receive messages. | 1.5.1 |
| UDPSocket.offMessage | Remove the listener function of the event that receives the message. | 1.5.1 |
| UDPSocket.send | Send a message to the specified IP and port | 1.5.1 |
| UDPSocket.setTTL | Set the IP_TTL socket option to set the maximum number of hops allowed when transmitting an IP packet | 1.5.16 |
| UDPSocket.write | Usage is the same as the send method | 1.5.16 |
6.6、Tcp Communication
| Name | Function Description | Minimum version |
|---|---|---|
| createTCPSocket | Create a TCP Socket instance | 1.5.1 |
| TCPSocket.bindWifi | Bind the TCP Socket to the current Wi-Fi network. If successful, it will trigger the onBindWifi event (only supported by Android) | 1.5.1 |
| TCPSocket.close | Close the connection | 1.5.1 |
| TCPSocket.connect | Start a connection on the given socket | 1.5.1 |
| TCPSocket.onClose | Listen for this event once the socket is completely closed | 1.5.1 |
| TCPSocket.offClose | Remove the listener function that emits this event once the socket is completely closed | 1.5.1 |
| TCPSocket.onConnect | Listen for this event when a socket connection is successfully established | 1.5.1 |
| TCPSocket.offConnect | Remove the listener function that triggers this event when a socket connection is successfully established | 1.5.1 |
| TCPSocket.onError | Listen for this event when an error occurs | 1.5.1 |
| TCPSocket.offError | Remove the listener function that triggers this event when an error occurs | 1.5.1 |
| TCPSocket.onMessage | Listen for this event when data is received | 1.5.1 |
| TCPSocket.offMessage | Remove the listener function that triggers this event when data is received | 1.5.1 |
| TCPSocket.onBindWifi | Listen for this event when a socket is successfully bound to the current Wi-Fi network | 1.5.1 |
| TCPSocket.offBindWifi | Remove the listener function that triggers this event when a socket is successfully bound to the current Wi-Fi network | 1.5.1 |
| TCPSocket.write | Send data on the socket | 1.5.1 |
6.7、mDNS
| Name | Function Description | Minimum version |
|---|---|---|
| stopLocalServiceDiscovery | Stop searching for mDNS Service | 1.5.1 |
| startLocalServiceDiscovery | Start searching for mDNS services in the LAN | 1.5.1 |
| offLocalServiceResolveFail | Remove the listener function for events where mDNS service resolution fails | 1.5.1 |
| onLocalServiceResolveFail | Listen for events where mDNS service resolution fails | 1.5.1 |
| offLocalServiceLost | Remove the listener function for events where mDNS service leaves | 1.5.1 |
| onLocalServiceLost | Listen for events where mDNS service leaves | 1.5.1 |
| offLocalServiceFound | Remove the listener function for events where mDNS service discovers | 1.5.1 |
| onLocalServiceFound | Listen for events where mDNS service discovers | 1.5.1 |
| offLocalServiceDiscoveryStop | Remove the listener function for events where mDNS service stops searching | 1.5.1 |
| onLocalServiceDiscoveryStop | Listen for events where mDNS service stops searching | 1.5.1 |
7、Data Cache
| Name | Function Description | Minimum version |
|---|---|---|
| setStorage | Store data in the specified key in the local cache | 1.5.0 |
| setStorageSync | Store data in the specified key in the local cache | 1.5.0 |
| revokeBufferURL | Destroy data in memory according to the URL | 1.5.35 |
| removeStorage | Remove the specified key from the local cache | 1.5.0 |
| removeStorageSync | Synchronous version of removeStorage | 1.5.0 |
| getStorage | Asynchronously obtain the content of the specified key from the local cache | 1.5.0 |
| createBufferURL | Create a unique URL in memory based on the passed buffer | 1.5.35 |
| getStorageSync | Synchronously obtain the content of the specified key from the local cache | 1.5.0 |
| getStorageInfo | Asynchronously obtain the relevant information of the current storage | 1.5.0 |
| getStorageInfoSync | Synchronous version of getStorageInfo | 1.5.0 |
| clearStorage | Clear the local data cache | 1.5.0 |
| clearStorageSync | Synchronous version of clearStorage | 1.5.0 |
| batchSetStorage | Batch store data in the specified key in the local cache | 1.5.16 |
| batchSetStorageSync | Synchronous version of batchSetStorage | 1.5.16 |
| batchGetStorage | Asynchronously obtain the content of the specified key from the local cache. | 1.5.16 |
| batchGetStorageSync | Synchronous version of batchGetStorage | 1.5.16 |
8、Data Analysis
| Name | Function Description | Minimum version |
|---|---|---|
| reportEvent | Event reporting | 1.5.16 |
9、Canvas
9.1、Canvas Overview
| Name | Function Description | Minimum version |
|---|---|---|
| createOffscreenCanvas | Create an off-screen canvas instance | 1.5.19 |
| createCanvasContext | Create a CanvasContext object for the canvas drawing context | 1.5.0 |
| canvasToTempFilePath | Export the content of the specified area of | 1.5.0 |
| canvasPutImageData | Draw pixel data to the canvas | 1.5.0 |
| canvasGetImageData | Get the implicit pixel data of the canvas area | 1.5.0 |
| Image | Picture object | 1.5.16 |
| ImageData | ImageData object | 1.5.16 |
| RenderingContext | Canvas drawing context | 1.5.16 |
9.2、canvasContext
| Name | Function Description | Minimum version |
|---|---|---|
| CanvasContext.arc | Create an arc | 1.5.0 |
| CanvasContext.arcTo | Draw an arc path based on control points and radius | 1.5.0 |
| CanvasContext.beginPath | Start creating a path | 1.5.0 |
| CanvasContext.bezierCurveTo | Create a cubic Bezier curve path | 1.5.0 |
| CanvasContext.clearRect | Clear the contents of the canvas within the rectangular area | 1.5.0 |
| CanvasContext.clip | Cut any shape and size from the original canvas | 1.5.0 |
| CanvasContext.closePath | Close a path | 1.5.0 |
| CanvasContext.createCircularGradient | Create a circular gradient color | 1.5.0 |
| CanvasContext.createLinearGradient | Create a linear gradient color | 1.5.0 |
| CanvasContext.createPattern | Create a method for creating a pattern for the specified image, which can repeat the meta-image in the specified direction | 1.5.0 |
| CanvasContext.draw | Draw the previous description (path, transformation, style) in the drawing context to the canvas | 1.5.0 |
| CanvasContext.drawImage | Draw the image to the canvas | 1.5.0 |
| CanvasContext.fill | Fill the contents of the current path | 1.5.0 |
| CanvasContext.fillRect | Fill a rectangle | 1.5.0 |
| CanvasContext.fillText | Draw the filled text on the canvas | 1.5.0 |
| CanvasContext.lineTo | Add a new point and then create a line from the last specified point to the target point | 1.5.0 |
| CanvasContext.measureText | Measure text size information | 1.5.0 |
| CanvasContext.moveTo | Move the path to the specified point in the canvas without creating a line | 1.5.0 |
| CanvasContext.quadraticCurveTo | Create a quadratic Bezier curve path | 1.5.0 |
| CanvasContext.rect | Create a rectangular path | 1.5.0 |
| CanvasContext.restore | Restore the previously saved drawing context | 1.5.0 |
| CanvasContext.rotate | Rotate the current coordinate axis clockwise around the origin | 1.5.0 |
| CanvasContext.save | Save the drawing context | 1.5.0 |
| CanvasContext.scale | After calling, the horizontal and vertical coordinates of the paths created later will be scaled | 1.5.0 |
| CanvasContext.setFillStyle | Set the fill color | 1.5.0 |
| CanvasContext.setFontSize | Set the font size | 1.5.0 |
| CanvasContext.setGlobalAlpha | Set the global brush transparency | 1.5.0 |
| CanvasContext.setLineCap | Set the endpoint style of the line | 1.5.0 |
| CanvasContext.setLineDash | Set the dashed line style | 1.5.0 |
| CanvasContext.setLineJoin | Set the intersection style of the line | 1.5.0 |
| CanvasContext.setLineWidth | Set the line width | 1.5.0 |
| CanvasContext.setMiterLimit | Set the maximum miter length | 1.5.0 |
| CanvasContext.setShadow | Set the shadow style | 1.5.0 |
| CanvasContext.setStrokeStyle | Set the stroke color | 1.5.0 |
| CanvasContext.setTextAlign | Set the text alignment. | 1.5.0 |
| CanvasContext.setTextBaseline | Set the vertical alignment of the text | 1.5.0 |
| CanvasContext.setTransform | Use a matrix to reset (override) the current transformation | 1.5.0 |
| CanvasContext.stroke | Draw the border of the current path | 1.5.0 |
| CanvasContext.strokeRect | Draw a rectangle (not filled) | 1.5.0 |
| CanvasContext.strokeText | Draw the text stroke at a given (x, y) position | 1.5.0 |
| CanvasContext.transform | Use a matrix to overlay the current transformation multiple times | 1.5.0 |
| CanvasContext.translate | Transform the origin (0, 0) of the current coordinate system | 1.5.0 |
9.3、CanvasGradient
| Name | Function Description | Minimum version |
|---|---|---|
| CanvasGradient.addColorStop | Add a color gradient point | 1.5.0 |
9.4、Canvas
| Name | Function Description | Minimum version |
|---|---|---|
| Canvas.cancelAnimationFrame | Cancel the animation request added to the schedule by requestAnimationFrame | 1.5.16 |
| Canvas.createImageData | Create an ImageData object | 1.5.16 |
| Canvas.createImage | Create an image object | 1.5.16 |
| Canvas.createPath2D | Create a Path2D object | 1.5.16 |
| Canvas.getContext | This method returns the drawing context of the Canvas. | 1.5.16 |
| Canvas.requestAnimationFrame | Executed at the next redraw | 1.5.16 |
| Canvas.toDataURL | Returns a data URl containing the image display | 1.5.16 |
9.5、OffscreenCanvas
| Name | Function Description | Minimum version |
|---|---|---|
| OffscreenCanvas.createImage | This method returns the drawing context of the OffscreenCanvas | 1.5.16 |
| OffscreenCanvas.getContext | Create an image object | 1.5.16 |
9.6、Path2D
| Name | Function Description | Minimum version |
|---|---|---|
| Path2D.addPath | Add a path to the current path | 1.5.16 |
| Path2D.arc | Add a circular path | 1.5.16 |
| Path2D.arcTo | Add a circular path with a given control point | 1.5.16 |
| Path2D.bezierCurveTo | Add a cubic Bezier curve path | 1.5.16 |
| Path2D.closePath | Close the path to the starting point | 1.5.16 |
| Path2D.ellipse | Add an elliptical arc path | 1.5.16 |
| Path2D.lineTo | Add a straight path | 1.5.16 |
| Path2D.moveTo | Move the starting point of the path | 1.5.16 |
| Path2D.quadraticCurveTo | Add a quadratic Bezier curve path | 1.5.16 |
| Path2D.rect | Add a square path | 1.5.16 |
10、Media
10.1、Map
| Name | Function Description | Minimum version |
|---|---|---|
| createMapContext | Create a map context MapContext object | 1.5.0 |
| MapContext.addArc | Add an arc | 1.5.16 |
| MapContext.addCustomLayer | Add a personalized layer | 1.5.16 |
| MapContext.addGroundOverlay | Create a custom image layer | 1.5.16 |
| MapContext.addMarkers | Add a marker | 1.5.0 |
| MapContext.eraseLines | Erase or gray out the line segment added to the map | 1.5.16 |
| MapContext.fromScreenLocation | Get the longitude and latitude corresponding to the point on the screen, with the origin of the coordinates at the upper left corner of the map | 1.5.0 |
| MapContext.getCenterLocation | Get the longitude and latitude of the center of the current map | 1.5.0 |
| MapContext.getRegion | Get the field of view of the current map | 1.5.0 |
| MapContext.getRotate | Get the rotation angle of the current map | 1.5.0 |
| MapContext.getScale | Get the zoom level of the current map | 1.5.0 |
| MapContext.getSkew | Get the tilt angle of the current map | 1.5.0 |
| MapContext.includePoints | Zoom in the field of view to display all longitude and latitude | 1.5.0 |
| MapContext.initMarkerCluster | Configure initial point aggregation | 1.5.16 |
| MapContext.moveAlong | Move the marker along the specified path for scenarios such as track playback | 1.5.0 |
| MapContext.moveToLocation | Move the center of the map to the current location point. At this time, you need to set the map component show-location to true | 1.5.0 |
| MapContext.on | Listen to map events | 1.5.16 |
| MapContext.openMapApp | Pull up the map APP and select navigation | 1.5.0 |
| MapContext.removeArc | Delete the arc | 1.5.16 |
| MapContext.removeCustomLayer | Remove the personalized layer | 1.5.16 |
| MapContext.removeGroundOverlay | Remove the custom image layer | 1.5.16 |
| MapContext.removeMarkers | Remove the marker | 1.5.0 |
| MapContext.setBoundary | Limit the display range of the map | 1.5.16 |
| MapContext.setCenterOffset | Set the center point offset of the map | 1.5.16 |
| MapContext.setLocMarkerIcon | Set the location point icon | 1.5.16 |
| MapContext.toScreenLocation | Get the screen coordinates corresponding to the latitude and longitude | 1.5.16 |
| MapContext.translateMarker | Translate the marker with animation | 1.5.0 |
| MapContext.updateGroundOverlay | Update the custom image layer. | 1.5.16 |
10.2、Image
| Name | Function Description | Minimum version |
|---|---|---|
| chooseImage | Select an image from the local album or take a photo with the camera. | 1.5.0 |
| compressImage | Compress the image interface, with optional compression quality. | 1.5.1 |
| getImageInfo | Get image information | 1.5.0 |
| previewImage | Preview the image in full screen on a new page | 1.5.0 |
| previewMedia | Preview images and videos | 1.5.1 |
| saveImageToPhotosAlbum | Save the image to the system album. | 1.5.1 |
10.3、Real-Time Audio And Video
| Name | Function Description | Minimum version |
|---|---|---|
| createLivePusherContext | Create a live-pusher context LivePusherContext object | 1.5.0 |
| createLivePlayerContext | Create a live-player context LivePlayerContext object | 1.5.0 |
| LivePlayerContext.exitfullscreen | Exit full screen. | 1.5.0 |
| LivePlayerContext.mute | Mute | 1.5.0 |
| LivePlayerContext.pause | Pause | 1.5.0 |
| LivePlayerContext.play | Play | 1.5.0 |
| LivePlayerContext.requestFullScreen | Enter full screen. | 1.5.0 |
| LivePlayerContext.resume | Restore | 1.5.0 |
| LivePlayerContext.snapshot | Take a screenshot | 1.5.0 |
| LivePlayerContext.stop | Stop | 1.5.0 |
| LivePusherContext.start | Start streaming and start camera preview at the same time | 1.5.0 |
| LivePusherContext.stop | Stop streaming and stop camera preview at the same time | 1.5.0 |
| LivePusherContext.pause | Pause streaming | 1.5.0 |
| LivePusherContext.resume | Resume streaming | 1.5.0 |
| LivePusherContext.switchCamera | Switch front and back cameras | 1.5.0 |
| LivePusherContext.snapshot | Snapshot | 1.5.0 |
| LivePusherContext.toggleTorch | Toggle flashlight | 1.5.0 |
| LivePusherContext.playBGM | Play background sound | 1.5.0 |
| LivePusherContext.stopBGM | Stop background sound | 1.5.0 |
| LivePusherContext.pauseBGM | Pause background sound | 1.5.0 |
| LivePusherContext.resumeBGM | Resume background sound | 1.5.0 |
| LivePusherContext.setBGMPosition | Set background sound progress | 1.5.0 |
| LivePusherContext.setMICVolume | Set the microphone volume | 1.5.0 |
| LivePusherContext.setBGMVolume | Set the background volume | 1.5.0 |
| LivePusherContext.setAudioReverbType | Set the mixing type | 1.5.0 |
| LivePusherContext.startPreview | Enable camera preview | 1.5.0 |
| LivePusherContext.stopPreview | Disable camera preview | 1.5.0 |
| LivePusherContext.startAudioRecord | Start recording | 1.5.0 |
| LivePusherContext.stopAudioRecord | Stop recording | 1.5.0 |
10.4、Audio
| Name | Function Description | Minimum version |
|---|---|---|
| stopVoice | Stop playing speech | 1.5.1 |
| playVoice | Start playing speech | 1.5.1 |
| pauseVoice | Pause the currently playing speech | 1.5.1 |
| setInnerAudioOption | Set the playback options of InnerAudioContext | 1.5.0 |
| getAvailableAudioSources | Get the currently supported audio input sources | 1.5.1 |
| createInnerAudioContext | Create an InnerAudioContext object for the internal 'audio' component context | 1.5.0 |
| AudioContext.pause | Pause audio | 1.5.1 |
| AudioContext.play | Play audio | 1.5.1 |
| AudioContext.seek | Jump to the specified position | 1.5.1 |
| AudioContext.setSrc | Set the audio address | 1.5.1 |
| InnerAudioContext.destroy | Destroy the current instance | 1.5.0 |
| InnerAudioContext.offCanplay | Remove the listener function for the event that the audio enters the playable state | 1.5.0 |
| InnerAudioContext.offEnded | Remove the listener function for the event that the audio is naturally played to the end | 1.5.0 |
| InnerAudioContext.offError | Remove the listener function for the audio playback error event | 1.5.0 |
| InnerAudioContext.offPause | Remove the listener function for the audio pause event | 1.5.0 |
| InnerAudioContext.offPlay | Remove the listener function for the audio playback event | 1.5.0 |
| InnerAudioContext.offSeeked | Remove the listener function for the audio jump operation event | 1.5.0 |
| InnerAudioContext.offSeeking | Remove the listener function for the audio jump operation event | 1.5.0 |
| InnerAudioContext.offStop | Remove the listener function for the audio stop event | 1.5.0 |
| InnerAudioContext.offTimeUpdate | Remove the listener function for the audio playback progress update event | 1.5.0 |
| InnerAudioContext.offWaiting | Remove the listener function for the audio loading event | 1.5.0 |
| InnerAudioContext.onCanplay | Listen for the event that the audio enters the playable state | 1.5.0 |
| InnerAudioContext.onEnded | Listen for the event that the audio is naturally played to the end | 1.5.0 |
| InnerAudioContext.onError | Listen for the audio playback error event | 1.5.0 |
| InnerAudioContext.onPause | Listen for the audio pause event | 1.5.0 |
| InnerAudioContext.onPlay | Listen for audio playback events | 1.5.0 |
| InnerAudioContext.onSeeked | Listen for the event that the audio completes the jump operation | 1.5.0 |
| InnerAudioContext.onSeeking | Listen for the event that the audio performs the jump operation | 1.5.0 |
| InnerAudioContext.onStop | Listen for the audio stop event | 1.5.0 |
| InnerAudioContext.onTimeUpdate | Listen for the audio playback progress update event | 1.5.0 |
| InnerAudioContext.onWaiting | Listen for the audio loading event | 1.5.0 |
| InnerAudioContext.pause | Pause | 1.5.0 |
| InnerAudioContext.play | Play | 1.5.0 |
| InnerAudioContext.seek | Jump to the specified position | 1.5.0 |
| InnerAudioContext.stop | Stop | 1.5.0 |
10.5、Video
| Name | Function Description | Minimum version |
|---|---|---|
| saveVideoToPhotosAlbum | Save the video to the system album | 1.5.0 |
| createVideoContext | Create a video context VideoContext object | 1.5.0 |
| chooseVideo | Shoot a video or select a video from the mobile phone album | 1.5.0 |
| compressVideo | Compress the video interface | 1.5.1 |
| chooseMedia | Shoot or select a picture or video from the mobile phone album | 1.5.1 |
| VideoContext.exitFullScreen | Exit full screen. | 1.5.0 |
| VideoContext.exitBackgroundPlayback | Exit the background audio playback mode | 1.5.16 |
| VideoContext.exitPictureInPicture | Exit the small window, this method can be called on any page | 1.5.16 |
| VideoContext.hideStatusBar | Hide the status bar, only valid in iOS full screen | 1.5.0 |
| VideoContext.pause | Pause the video | 1.5.0 |
| VideoContext.play | Play the video | 1.5.0 |
| VideoContext.requestFullScreen | Enter full screen. | 1.5.0 |
| VideoContext.requestBackgroundPlayback | Enter the background audio playback mode | 1.5.16 |
| VideoContext.seek | Jump to the specified position | 1.5.0 |
| VideoContext.sendDanmu | Send a bullet comment | 1.5.0 |
| VideoContext.showStatusBar | Show the status bar, only valid in iOS full screen. | 1.5.0 |
| VideoContext.stop | Stop the video | 1.5.0 |
10.6、Transparent Video
| Name | Function Description | Minimum version |
|---|---|---|
| createAnimationVideo | Create the animation-video context AnimationVideoContext object | 1.5.0 |
| AnimationVideoContext.play | Play the video | 1.5.0 |
| AnimationVideoContext.pause | Pause the video | 1.5.0 |
| AnimationVideoContext.seek | Jump to the specified position | 1.5.0 |
10.7、Camera
| Name | Function Description | Minimum version |
|---|---|---|
| createCameraContext | Create the camera context CameraContext object | 1.5.0 |
| CameraContext.onCameraFrame | Get the Camera real-time frame data. | 1.5.0 |
| CameraContext.setZoom | Set the zoom level. | 1.5.0 |
| CameraContext.startRecord | Start recording. | 1.5.0 |
| CameraContext.stopRecord | End recording. | 1.5.0 |
| CameraContext.takePhoto | Take a photo. | 1.5.0 |
| CameraFrameListener.start | Start listening to frame data. | 1.5.0 |
| CameraFrameListener.stop | Stop listening to frame data. | 1.5.0 |
10.8、Recording
| Name | Function Description | Minimum version |
|---|---|---|
| startRecord | Start recording | 1.5.1 |
| stopRecord | Stop recording | 1.5.1 |
| getRecorderManager | Get the globally unique recording manager RecorderManager | 1.5.0 |
| RecorderManager.onError | Listen for recording error events | 1.5.0 |
| RecorderManager.onFrameRecorded | Listen for events where files of a specified frame size have been recorded | 1.5.0 |
| RecorderManager.onlnterruptionBegin | Listen for events where recording is interrupted due to system usage | 1.5.0 |
| RecorderManager.onlnterruptionEnd | Listen for events where recording is interrupted and ends | 1.5.0 |
| RecorderManager.onPause | Listen for events where recording is paused | 1.5.0 |
| RecorderManager.onResume | Listen for events where recording continues | 1.5.0 |
| RecorderManager.onStart | Listen for events where recording starts | 1.5.0 |
| RecorderManager.onStop | Listen for events where recording ends | 1.5.0 |
| RecorderManager.pause | Pause recording | 1.5.0 |
| RecorderManager.resume | Continue recording | 1.5.0 |
| RecorderManager.start | Start recording | 1.5.0 |
| RecorderManager.stop | Pause recording | 1.5.0 |
10.9、Background Audio
| Name | Function Description | Minimum version |
|---|---|---|
| stopBackgroundAudio | Stop playing music | 1.5.1 |
| seekBackgroundAudio | Control the progress of music playing | 1.5.1 |
| playBackgroundAudio | Use background player to play music | 1.5.1 |
| pauseBackgroundAudio | Pause music and listen for music stop events | 1.5.1 |
| onBackgroundAudioStop | Listen for music stop events | 1.5.1 |
| onBackgroundAudioPlay | Listen for music playing events | 1.5.1 |
| onBackgroundAudioPause | Listen for music pause events | 1.5.1 |
| getBackgroundAudioPlayerState | Get background music playing status | 1.5.1 |
| getBackgroundAudioManager | Get the globally unique background audio manager | 1.5.1 |
| BackgroundAudioManager.onCanplay | Listen for background audio entering the playable state | 1.5.16 |
| BackgroundAudioManager.onEnded | Listen for background audio natural playback end events | 1.5.16 |
| BackgroundAudioManager.onError | Listen for background audio playback error events | 1.5.16 |
| BackgroundAudioManager.onNext | Listen for the user clicking the next song event in the system music playback panel (iOS only) | 1.5.16 |
| BackgroundAudioManager.onPause | Listen for background audio pause events | 1.5.16 |
| BackgroundAudioManager.onPlay | Listen for background audio playback events | 1.5.16 |
| BackgroundAudioManager.onPrev | Listen for the user clicking the previous song event in the system music playback panel (iOS only) | 1.5.16 |
| BackgroundAudioManager.onSeeked | Listen for background audio completion jump operation events | 1.5.16 |
| BackgroundAudioManager.onSeeking | Listen for background audio start jump operation events | 1.5.16 |
| BackgroundAudioManager.onStop | Listen for background audio stop events | 1.5.16 |
| BackgroundAudioManager.onTimeUpdate | Listen for background audio playback progress update events | 1.5.16 |
| BackgroundAudioManager.onWaiting | Listen for audio loading events | 1.5.16 |
| BackgroundAudioManager.pause | Pause music | 1.5.16 |
| BackgroundAudioManager.play | Play music | 1.5.16 |
| BackgroundAudioManager.seek | Jump to the specified position | 1.5.16 |
| BackgroundAudioManager.stop | Stop music | 1.5.16 |
10.10、Rich Text
| Name | Function Description | Minimum version |
|---|---|---|
| EditorContext | EditorContext instance | 1.5.16 |
| EditorContext.blur | Editor loses focus and keyboard is closed at the same time | 1.5.16 |
| EditorContext.clear | Clear editor content | 1.5.16 |
| EditorContext.format | Modify style | 1.5.16 |
| EditorContext.getContents | Get editor content | 1.5.16 |
| EditorContext.getSelectionText | Get the plain text content in the selected area of | 1.5.16 |
| EditorContext.insertDivider | Insert dividing line | 1.5.16 |
| EditorContext.insertImage | Insert image | 1.5.16 |
| EditorContext.insertText | Overwrite the current selection and set a text | 1.5.16 |
| EditorContext.redo | Restore | 1.5.16 |
| EditorContext.removeFormat | Clear the style of the current selection | 1.5.16 |
| EditorContext.scrollIntoView | Make the editor cursor scroll to the visible area of | 1.5.16 |
| EditorContext.setContents | Initialize the editor content | 1.5.16 |
| EditorContext.undo | Undo | 1.5.1 |
11、File
11.1、File overview
| Name | Function Description | Minimum version |
|---|---|---|
| saveFile | Save the file locally | 1.5.0 |
| removeSavedFile | Delete the local cache file. | 1.5.0 |
| openDocument | Open the document on a new page | 1.5.0 |
| getSavedFileList | Get the list of local cache files saved under this applet. | 1.5.0 |
| getSavedFileInfo | Get the file information of local files. | 1.5.0 |
| getFileSystemManager | Get the globally unique file manager | 1.5.0 |
| getFileInfo | Get the file information. | 1.5.0 |
| ReadResult | File reading results | 1.5.16 |
| WriteResult | File writing results | 1.5.16 |
11.2、FileSystemManager
| Name | Function Description | Minimum version |
|---|---|---|
| FileSystemManager.access | Judge whether the file/directory exists | 1.5.0 |
| FileSystemManager.accessSync | Synchronous version of FileSystemManager.access | 1.5.0 |
| FileSystemManager.appendFile | Append content to the end of the file | 1.5.0 |
| FileSystemManager.appendFileSync | Synchronous version of FileSystemManager.appendFile | 1.5.0 |
| FileSystemManager.close | Close the file | 1.5.16 |
| FileSystemManager.closeSync | Synchronously close the file | 1.5.16 |
| FileSystemManager.copyFile | Copy the file | 1.5.0 |
| FileSystemManager.copyFileSync | Synchronous version of FileSystemManager.copyFile | 1.5.0 |
| FileSystemManager.fstat | Get the status information of the file. | 1.5.16 |
| FileSystemManager.fstatSync | Synchronously get the status information of the file. | 1.5.16 |
| FileSystemManager.ftruncate | Truncate the file contents FileSystemManager.open | 1.5.16 |
| FileSystemManager.ftruncateSync | Truncate the file contents. | 1.5.16 |
| FileSystemManager.getFileInfo | Get the local temporary file or local cache file information under the applet. | 1.5.0 |
| FileSystemManager.getSavedFileList | Get the list of local cache files saved under this applet. | 1.5.0 |
| FileSystemManager.mkdir | Create a directory | 1.5.0 |
| FileSystemManager.mkdirSync | Synchronous version of FileSystemManager.mkdir | 1.5.0 |
| FileSystemManager.open | Open the file and return the file descriptor | 1.5.16 |
| FileSystemManager.openSync | Synchronously open the file and return the file descriptor. | 1.5.16 |
| FileSystemManager.read | Read the file | 1.5.16 |
| FileSystemManager.readSync | Read the file | 1.5.16 |
| FileSystemManager.readCompressedFile | Read the local file contents of the specified compression type. | 1.5.16 |
| FileSystemManager.readCompressedFileSync | Synchronously read the local file contents of the specified compression type. | 1.5.16 |
| FileSystemManager.readdir | Read the list of files in the directory | 1.5.0 |
| FileSystemManager.readdirSync | Synchronous version of FileSystemManager.readdir | 1.5.0 |
| FileSystemManager.readFile | Read the local file content | 1.5.0 |
| FileSystemManager.readFileSync | Synchronous version of FileSystemManager.readFile | 1.5.0 |
| FileSystemManager.readZipEntry | Read the files in the compressed package | 1.5.16 |
| FileSystemManager.removeSavedFile | Delete the local cache files saved under this applet | 1.5.0 |
| FileSystemManager.rename | Rename the file | 1.5.0 |
| FileSystemManager.renameSync | Synchronous version of FileSystemManager.rename | 1.5.0 |
| FileSystemManager.rmdir | Delete the directory | 1.5.0 |
| FileSystemManager.rmdirSync | Synchronous version of FileSystemManager.rmdir | 1.5.0 |
| FileSystemManager.saveFile | Save temporary files to the local | 1.5.0 |
| FileSystemManager.saveFileSync | Synchronous version of FileSystemManager.saveFile | 1.5.0 |
| FileSystemManager.stat | Get the file Stats object | 1.5.0 |
| FileSystemManager.statSync | Synchronous version of FileSystemManager.stat | 1.5.0 |
| FileSystemManager.truncate | Truncate the file contents. | 1.5.16 |
| FileSystemManager.truncateSync | Truncate the file content (Synchronous version of truncate) | 1.5.16 |
| FileSystemManager.unlink | Delete the file | 1.5.0 |
| FileSystemManager.unlinkSync | Synchronous version of FileSystemManager.unlink | 1.5.0 |
| FileSystemManager.unzip | Unzip the file | 1.5.0 |
| FileSystemManager.write | Write the file | 1.5.16 |
| FileSystemManager.writeSync | Write the file synchronously | 1.5.16 |
| FileSystemManager.writeFile | Write the file | 1.5.0 |
| FileSystemManager.writeFileSync | The synchronous version of FileSystemManager.writeFile | 1.5.0 |
11.3、Stats
| Name | Function Description | Minimum version |
|---|---|---|
| Stats.isDirectory | Determine whether the current file is a directory | 1.5.0 |
| Stats.isFile | Determine whether the current file is a normal file | 1.5.0 |
12、Open Interface
12.1、Login
| Name | Function Description | Minimum version |
|---|---|---|
| login | Call the interface to obtain the login credentials (code) | 1.5.1 |
| checkSession | Check whether the login state has expired | 1.5.1 |
12.2、Account information
| Name | Function Description | Minimum version |
|---|---|---|
| getAccountInfoSync | Get the current account information | 1.5.1 |
12.3、User information
| Name | Function Description | Minimum version |
|---|---|---|
| getUserProfile | Get user information | 1.5.1 |
| getUserInfo | Obtain user information, user authorization scope.userInfo is required during use. | 1.5.1 |
| userInfo | User information | 1.5.0 |
12.4、Settings
| Name | Function Description | Minimum version |
|---|---|---|
| AuthSetting | User authorization setting information | 1.5.0 |
| getSetting | Get the user's current settings | 1.5.0 |
| openSetting | Call the client applet settings interface and return the operation results set by the user | 1.5.0 |
12.5、Biometric authentication
| Name | Function Description | Minimum version |
|---|---|---|
| checkIsSoterEnrolledInDevice | Verify whether the biometric information is entered in the device. | 1.5.0 |
| checkIsSupportSoterAuthentication | Verify whether the device supports biometric authentication. | 1.5.0 |
| startSoterAuthentication | Start biometric authentication | 1.5.0 |
12.6、Authorization
| Name | Function Description | Minimum version |
|---|---|---|
| authorize | Initiate an authorization request to the user in advance | 1.5.0 |
13、Location
| Name | Function Description | Minimum version |
|---|---|---|
| getLocation | Get the current geographic location and speed. | 1.5.0 |
| choosePoi | Open the POI list to select the location, supporting fuzzy positioning (accurate to the city) and precise positioning mixed selection | 1.5.0 |
| chooseLocation | Open the map to select the location | 1.5.0 |
| stopLocationUpdate | Turn off monitoring real-time location changes, and stop receiving messages in both the front and back ends | 1.5.0 |
| startLocationUpdateBackground | Open the applet to receive location messages when entering the front and back ends, and guide the user to turn on 'authorization' | 1.5.0 |
| startLocationUpdate | Open the applet to receive location messages when entering the foreground. | 1.5.0 |
| openLocation | Use Luffa's built-in map to view the location | 1.5.0 |
| onLocationChangeError | Triggered when the continuous positioning interface fails to return | 1.5.0 |
| onLocationChange | Monitor real-time location change events, which must be used in conjunction with startLocationUpdateBackground and startLocationUpdate | 1.5.0 |
| offLocationChangeError | Remove the trigger when the continuous positioning interface fails to return | 1.5.0 |
| offLocationChange | Cancel monitoring real-time location change events | 1.5.0 |
| getFuzzyLocation | Get the current fuzzy location | 1.5.0 |
14、Device
14.1、Bluetooth General
| Name | Function Description | Minimum version |
|---|---|---|
| stopBluetoothDevicesDiscovery | Stop searching for nearby Bluetooth peripherals | 1.5.0 |
| startBluetoothDevicesDiscovery | Start searching for nearby Bluetooth peripherals | 1.5.0 |
| openBluetoothAdapter | Initialize the Bluetooth module | 1.5.1 |
| getConnectedBluetoothDevices | Get connected Bluetooth devices based on the main service UUID | 1.5.1 |
| getBluetoothDevices | Get all Bluetooth devices searched during the Bluetooth module is effective. | 1.5.1 |
| getBluetoothAdapterState | Get the status of the local Bluetooth adapter. | 1.5.1 |
| closeBluetoothAdapter | Turn off the Bluetooth module | 1.5.1 |
| onBluetoothDeviceFound | Listen for events of searching for new devices | 1.5.0 |
| offBluetoothDeviceFound | Remove all listener functions for events of searching for new devices. | 1.5.0 |
| onBluetoothAdapterStateChange | Monitor Bluetooth adapter status change events. | 1.5.0 |
| offBluetoothAdapterStateChange | Remove all listener functions for Bluetooth adapter status change events. | 1.5.0 |
| makeBluetoothPair | Bluetooth pairing interface, only supported by Android | 1.5.0 |
| isBluetoothDevicePaired | Query whether the Bluetooth device is paired, only supported by Android. | 1.5.0 |
14.2、Bluetooth-Low Power Central Device
| Name | Function Description | Minimum version |
|---|---|---|
| writeBLECharacteristicValue | Write binary data to the characteristic value of a Bluetooth low energy device | 1.5.1 |
| readBLECharacteristicValue | Read binary data of the characteristic value of a Bluetooth low energy device | 1.5.1 |
| setBLEMTU | Negotiate and set the maximum transmission unit of Bluetooth low energy | 1.5.1 |
| getBLEMTU | Get the maximum transmission unit of Bluetooth low energy | 1.5.1 |
| onBLEMTUChange | Listen for the change event of the maximum transmission unit of Bluetooth low energy (only triggered by Android) | 1.5.1 |
| offBLEMTUChange | Remove the listener function of the change event of the maximum transmission unit of Bluetooth low energy | 1.5.1 |
| onBLEConnectionStateChange | Listen for the change event of the connection state of Bluetooth low energy | 1.5.1 |
| offBLEConnectionStateChange | Remove the listener function of the change event of the connection state of Bluetooth low energy | 1.5.1 |
| onBLECharacteristicValueChange | Listen for the characteristic value change event of Bluetooth low energy device | 1.5.1 |
| offBLECharacteristicValueChange | Remove all listeners for characteristic value change events of Bluetooth low energy devices | 1.5.1 |
| notifyBLECharacteristicValueChange | Enable the notify function when characteristic value of Bluetooth low energy devices changes, and subscribe to characteristics | 1.5.1 |
| getBLEDeviceServices | Get all services of Bluetooth low energy devices (services) | 1.5.1 |
| getBLEDeviceRSSI | Get the signal strength of Bluetooth low energy devices | 1.5.1 |
| getBLEDeviceCharacteristics | Get all characteristics of a service of Bluetooth low energy devices | 1.5.1 |
| createBLEConnection | Connect Bluetooth low energy devices | 1.5.1 |
| closeBLEConnection | Disconnect from Bluetooth low energy devices | 1.5.1 |
14.3、Bluetooth-Low Power Peripheral Device
| Name | Function Description | Minimum version |
|---|---|---|
| onBLEPeripheralConnectionStateChanged | Listen for events of current peripheral devices being connected or disconnected | 1.5.1 |
| offBLEPeripheralConnectionStateChanged | Remove listeners for events of current peripheral devices being connected or disconnected. | 1.5.1 |
| createBLEPeripheralServer | Establish a local server as a Bluetooth low energy peripheral device | 1.5.1 |
| BLEPeripheraServer.addService | Add services. | 1.5.1 |
| BLEPeripheraServer.removeService | Remove services. | 1.5.1 |
| BLEPeripheraServer.startAdvertising | Start broadcasting locally created peripheral devices | 1.5.1 |
| BLEPeripheraServer.stopAdvertising | Stop broadcasting | 1.5.1 |
| BLEPeripheraServer.writeCharacteristicValue | Write binary data values | 1.5.1 |
| BLEPeripheraServer.onCharacteristicWriteRequest | Listen for events of connected devices requesting to write characteristic values | 1.5.1 |
| BLEPeripheraServer.offCharacteristicWriteRequest | Remove listeners for events of connected devices requesting to write characteristic values | 1.5.1 |
| BLEPeripheraServer.onCharacteristicReadRequest | Listen for events of connected devices requesting to read characteristic values | 1.5.1 |
| BLEPeripheraServer.offCharacteristicReadRequest | Remove listeners for events of connected devices requesting to read characteristic values | 1.5.1 |
| BLEPeripheraServer.onCharacteristicSubscribed | Listen for characteristic subscription events, only supported by iOS | 1.5.1 |
| BLEPeripheraServer.offCharacteristicSubscribed | Remove listeners for characteristic subscription events | 1.5.1 |
| BLEPeripheraServer.onCharacteristicUnsubscribed | Listen for the feature subscription cancellation event, only supported by iOS | 1.5.1 |
| BLEPeripheraServer.offCharacteristicUnsubscribed | Remove the listener function for the feature subscription cancellation event | 1.5.1 |
14.4、Bluetooth-Beacon
| Name | Function Description | Minimum version |
|---|---|---|
| stopBeaconDiscovery | Stop searching for nearby Beacon devices | 1.5.1 |
| startBeaconDiscovery | Start searching for nearby Beacon devices | 1.5.1 |
| onBeaconUpdate | Listen for Beacon device update events, only one listener can be registered | 1.5.1 |
| offBeaconUpdate | Remove all listener functions for Beacon device update events | 1.5.1 |
| onBeaconServiceChange | Listen for Beacon service status change events, only one listener can be registered | 1.5.1 |
| offBeaconServiceChange | Remove all listener functions for Beacon service status change events | 1.5.1 |
| getBeacons | Get all searched Beacon devices | 1.5.1 |
| BeaconInfo | Beacon devices | 1.5.1 |
14.5、NFC
14.5.1、getNFCAdapter
| Name | Function Description | Minimum version |
|---|---|---|
| getNFCAdapter | Get NFC instances | 1.5.0 |
14.5.2、NFCAdapter
| Name | Function Description | Minimum version |
|---|---|---|
| NFCAdapter.startDiscovery | Turn on devices | 1.5.0 |
| NFCAdapter.stopDiscovery | Turn off devices | 1.5.0 |
| NFCAdapter.getNdef | Get Ndef instances, which support reading and writing NDEF data on NFC tags in NDEF format | 1.5.0 |
| NFCAdapter.getNfcA | Get NfcA instances, which support reading and writing NFC-A (ISO 14443-3A) standards | 1.5.0 |
| NFCAdapter.getNfcB | Get NfcB instances, which support reading and writing NFC-B (ISO 14443-3B) standards | 1.5.0 |
| NFCAdapter.getNfcF | Get NfcF instances, which support reading and writing NFC-F (JIS 6319-4) standards | 1.5.0 |
| NFCAdapter.getNfcV | Get NfcV instances, which support reading and writing NFC-V (ISO 15693) standards | 1.5.0 |
| NFCAdapter.getIsoDep | Get IsoDep instances, which support reading and writing ISO-DEP (ISO 14443-4) standards | 1.5.0 |
| NFCAdapter.getMifareClassic | Get MifareClassic instances, which support reading and writing MIFARE Classic tags | 1.5.0 |
| NFCAdapter.getMifareUltralight | Get MifareUltralight instances, which support reading and writing MIFARE Ultralight tags | 1.5.0 |
| NFCAdapter.onDiscovered | Monitor NFC Tag | 1.5.0 |
| NFCAdapter.offDiscovered | Remove NFC Tag listener function | 1.5.0 |
14.5.3、IsoDep
| Name | Function Description | Minimum version |
|---|---|---|
| IsoDep.connect | Connect NFC tag | 1.5.0 |
| IsoDep.close | Disconnect | 1.5.0 |
| IsoDep.setTimeout | Set timeout | 1.5.0 |
| IsoDep.isConnected | Check if connected | 1.5.0 |
| IsoDep.getMaxTransceiveLength | Get maximum transmission length | 1.5.0 |
| IsoDep.transceive | Send data | 1.5.0 |
| IsoDep.getHistoricalBytes | Get reset information | 1.5.0 |
14.5.4、MifareClassic
| Name | Function Description | Minimum version |
|---|---|---|
| MifareClassic.connect | Connect NFC tag | 1.5.0 |
| MifareClassic.close | Disconnect | 1.5.0 |
| MifareClassic.setTimeout | Set timeout | 1.5.0 |
| MifareClassic.isConnected | Check if connected | 1.5.0 |
| MifareClassic.getMaxTransceiveLength | Get maximum transmission length | 1.5.0 |
| MifareClassic.transceive | Send data | 1.5.0 |
14.5.5、MifareUltralifght
| Name | Function Description | Minimum version |
|---|---|---|
| MifareUltralifght.connect | Connect NFC tag | 1.5.0 |
| MifareUltralifght.close | Disconnect | 1.5.0 |
| MifareUltralifght.setTimeout | Set timeout | 1.5.0 |
| MifareUltralifght.getMaxTransceiveLength | Get maximum transmission length | 1.5.0 | | MifareUltralifght.transceive | Send data | 1.5.0 |
14.5.6、Ndef
| Name | Function Description | Minimum version |
|---|---|---|
| Ndef.connect | Connect NFC tag | 1.5.0 |
| Ndef.close | Disconnect | 1.5.0 |
| Ndef.setTimeout | Set timeout | 1.5.0 |
| Ndef.isConnected | Check if connected | 1.5.0 |
| Ndef.offNdefMessage | Cancel listening for Ndef messages | 1.5.0 |
| Ndef.onNdefMessage | Listen for Ndef messages | 1.5.0 |
| Ndef.writeNdefMessage | Rewrite Ndef tag content | 1.5.0 |
14.5.7、NfcA
| Name | Function Description | Minimum version |
|---|---|---|
| NfcA.connect | Connect NFC tag | 1.5.0 |
| NfcA.close | Disconnect | 1.5.0 |
| NfcA.setTimeout | Set timeout | 1.5.0 |
| IsoDep.isConnected | Check if connected | 1.5.0 |
| NfcA.getMaxTransceiveLength | Get maximum transmission length | 1.5.0 |
| NfcA.transceive | Send data | 1.5.0 |
| NfcA.getAtqa | Get ATQA information | 1.5.0 |
| NfcA.getSak | Get SAK information | 1.5.0 |
14.5.8、NfcB
| Name | Function Description | Minimum version |
|---|---|---|
| NfcB.connect | Connect NFC tag | 1.5.0 |
| NfcB.close | Disconnect | 1.5.0 |
| NfcB.setTimeout | Set timeout | 1.5.0 |
| NfcB.isConnected | Check if connected | 1.5.0 |
| NfcB.getMaxTransceiveLength | Get maximum transmission length | 1.5.0 |
| NfcB.transceive | Send data | 1.5.0 |
14.5.9、NfcF
| Name | Function Description | Minimum version |
|---|---|---|
| NfcF.connect | Connect NFC tag | 1.5.0 |
| NfcF.close | Disconnect | 1.5.0 |
| NfcF.setTimeout | Set timeout | 1.5.0 |
| NfcF.isConnected | Check if connected | 1.5.0 |
| NfcF.getMaxTransceiveLength | Get maximum transmission length | 1.5.0 |
| NfcF.transceive | Send data | 1.5.0 |
14.5.10、NfcV
| Name | Function Description | Minimum version |
|---|---|---|
| NfcV.connect | Connect NFC tag | 1.5.0 |
| NfcV.close | Disconnect | 1.5.0 |
| NfcV.setTimeout | Set timeout | 1.5.0 |
| NfcV.isConnected | Check if connected | 1.5.0 |
| NfcV.getMaxTransceiveLength | Get maximum transmission length | 1.5.0 |
| NfcV.transceive | Send data | 1.5.0 |
14.6、WiFi
| Name | Function Description | Minimum version |
|---|---|---|
| onWifiConnected | Listen for events connected to Wi-Fi | 1.5.1 |
| offWifiConnected | Remove listener function for events connected to Wi-Fi | 1.5.1 |
| stopWifi | Turn off Wi-Fi module | 1.5.0 |
| startWifi | Initialize Wi-Fi module | 1.5.0 |
| onGetWifiList | Listen for events of getting Wi-Fi list data | 1.5.0 |
| offGetWifiList | Remove listener function for events of getting Wi-Fi list data | 1.5.0 |
| getConnectedWifi | Get connected Wi-Fi information | 1.5.0 |
| WifiInfo | Wifi information | 1.5.1 |
14.7、Calendar
| Name | Function Description | Minimum version |
|---|---|---|
| addPhoneRepeatCalendar | Add recurring events to system calendar | 1.5.1 |
| addPhoneCalendar | Add events to system calendar | 1.5.1 |
14.8、Clipboard
| Name | Function Description | Minimum version |
|---|---|---|
| setClipboardData | Set system clipboard content | 1.5.1 |
| getClipboardData | Get system clipboard content | 1.5.1 |
14.9、Network
| Name | Function Description | Minimum version |
|---|---|---|
| onNetworkStatusChange | Listen for network status change events | 1.5.1 |
| getNetworkType | Get network type | 1.5.1 |
| offNetworkStatusChange | Remove listener function for network status change events | 1.5.1 |
14.10、Encryption
| Name | Function Description | Minimum version |
|---|---|---|
| getRandomValues | Get cryptographically secure random numbers | 1.5.1 |
14.11、Keyboard
| Name | Function Description | Minimum version |
|---|---|---|
| onKeyboardHeightChange | Listen for keyboard height change events | 1.5.1 |
| hideKeyboard | After input, textarea, etc. focus on pulling up the keyboard, manually call this interface to close the keyboard | 1.5.1 |
| offKeyboardHeightChange | Remove listener function for keyboard height change events | 1.5.1 |
| getSelectedTextRange | After input, textarea, etc. focus on, get the cursor position of the input box | 1.5.1 |
14.12、Phone
| Name | Function Description | Minimum version |
|---|---|---|
| makePhoneCall | Make a call | 1.5.1 |
14.13、Accelerometer
| Name | Function Description | Minimum version |
|---|---|---|
| startAccelerometer | Start listening for acceleration data | 1.5.1 |
| stopAccelerometer | Stop listening for acceleration data | 1.5.1 |
| onAccelerometerChange | Listen for acceleration data events | 1.5.1 |
| offAccelerometerChange | Remove listener function for acceleration data events | 1.5.1 |
14.14、Compass
| Name | Function Description | Minimum version |
|---|---|---|
| startCompass | Start listening for compass data | 1.5.0 |
| stopCompass | Stop listening for compass data | 1.5.0 |
| onCompassChange | Listen for compass data change events | 1.5.0 |
| offCompassChange | Remove listener function for compass data change events | 1.5.0 |
14.15、Gyroscope
| Name | Function Description | Minimum version |
|---|---|---|
| startGyroscope | Start listening for gyroscope data | 1.5.1 |
| stopGyroscope | Stop listening for gyroscope data | 1.5.1 |
| onGyroscopeChange | Listen for gyroscope data change events | 1.5.1 |
| offGyroscopeChange | Remove the listener function for gyroscope data change events | 1.5.1 |
14.16、Scan Code
| Name | Function Description | Minimum version |
|---|---|---|
| scanCode | Call up the client code scanning interface to scan the code | 1.5.0 |
14.17、Sms
| Name | Function Description | Minimum version |
|---|---|---|
| sendSms | Pull up the mobile phone to send text messages interface | 1.5.1 |
14.18、Vibration
| Name | Function Description | Minimum version |
|---|---|---|
| vibrateShort | Make the mobile phone vibrate for a short time (15 ms) | 1.5.1 |
| vibrateLong | Make the mobile phone vibrate for a long time (400 ms) | 1.5.1 |
14.19、Contact
| Name | Function Description | Minimum version |
|---|---|---|
| chooseContact | Pull up the mobile phone address book and select a contact | 1.5.1 |
| addPhoneContact | Add a mobile phone address book contact | 1.5.1 |
14.20、Battery
| Name | Function Description | Minimum version |
|---|---|---|
| getBatteryInfoSync | The synchronous version of wx.getBatteryInfo | 1.5.1 |
| getBatteryInfo | Get the device power | 1.5.1 |
14.21、Screen
| Name | Function Description | Minimum version |
|---|---|---|
| setVisualEffectOnCapture | Set the screen performance when taking screenshots/recording | 1.5.1 |
| setScreenBrightness | Set the screen brightness | 1.5.1 |
| setKeepScreenOn | Set whether to keep it always on | 1.5.1 |
| onUserCaptureScreen | Listen for user active screenshot events | 1.5.1 |
| onScreenRecordingStateChanged | Listen for user recording events | 1.5.1 |
| offUserCaptureScreen | User active screenshot events | 1.5.1 |
| offScreenRecordingStateChanged | Remove the listener function for user recording events | 1.5.1 |
| getScreenRecordingState | Query whether the user is recording | 1.5.1 |
| getScreenBrightness | Get the screen brightness | 1.5.1 |
14.22、Device Orientation
| Name | Function Description | Minimum version |
|---|---|---|
| stopDeviceMotionListening | Stop listening for changes in device orientation | 1.5.1 |
| startDeviceMotionListening | Start listening for changes in device orientation | 1.5.1 |
| onDeviceMotionChange | Listen for device orientation change events | 1.5.1 |
| offDeviceMotionChange | Remove the listener function for device orientation change events | 1.5.1 |
14.23、Memory
| Name | Function Description | Minimum version |
|---|---|---|
| onMemoryWarning | Listen for low memory warning events | 1.5.1 |
| offMemoryWarning | Remove the listener function for low memory warning events | 1.5.1 |
14.24、Accessibility
| Name | Function Description | Minimum version |
|---|---|---|
| checkIsOpenAccessibility | Detect whether visual accessibility is enabled | 1.5.1 |
15、WXML
15.1、WXML Summary
| Name | Function Description | Minimum version |
|---|---|---|
| createSelectorQuery | Returns a SelectorQuery object instance | 1.5.0 |
| createIntersectionObserver | Creates and returns an IntersectionObserver object instance | 1.5.0 |
15.2、IntersectionObserve
| Name | Function Description | Minimum version |
|---|---|---|
| IntersectionObserve.relativeTo | Uses the selector to specify a node as one of the reference areas | 1.5.0 |
| IntersectionObserve.relativeToViewport | Specifies the page display area as one of the reference areas. | 1.5.0 |
| IntersectionObserve.disconnect | Stop monitoring. The callback function will no longer be triggered. | 1.5.0 |
| IntersectionObserve.observe | Specifies the target node and starts monitoring the intersection state changes. | 1.5.0 |
15.3、NodesRef
| Name | Function Description | Minimum version |
|---|---|---|
| NodesRef.fields | Gets node related information | 1.5.0 |
| NodesRef.boundingClientRect | Adds a query request for the layout position of the node | 1.5.0 |
| NodesRef.scrollOffset | Adds a query request for the scroll position of the node | 1.5.0 |
| NodesRef.context | Adds a query request for the Context object of the node | 1.5.0 |
| NodesRef.node | Gets the Node node instance | 1.5.0 |
15.4、SelectorQuery
| Name | Function Description | Minimum version |
|---|---|---|
| SelectorQuery.exec | Executes all requests | 1.5.0 |
| SelectorQuery.in | Changes the selection range of the selector to the custom component component | 1.5.0 |
| SelectorQuery.select | Selects the first node that matches the selector selector in the current page | 1.5.0 |
| SelectorQuery.selectAll | Selects all nodes that match the selector selector in the current page. | 1.5.0 |
| SelectorQuery.selectViewport | Selects the display area | 1.5.0 |
15.5、meidaQueryObserver
| Name | Function Description | Minimum version |
|---|---|---|
| MediaQueryObserver.disconnect | Stops monitoring. | 1.5.16 |
| MediaQueryObserver.observe | Starts monitoring the page media query changes. | 1.5.16 |
16、Custom Api
| Name | Function Description | Minimum version |
|---|---|---|
| invokeNativePlugin | Custom Api | 1.5.0 |