Skip to content

Api Overview

1.Basics

1.1、System capabilities

NameFunction DescriptionMinimum version
canIuseDetermine whether the API, callback, parameters, components, etc. of the mini program are available in the current version.1.5.0
envEnvironment variables1.5.1
base64ToArrayBufferConvert Base64 string to ArrayBuffer object1.5.1
arrayBufferToBase64Convert ArrayBuffer object to Base64 string1.5.1

1.2、System

NameFunction DescriptionMinimum version
getSystemInfoAsynchronous call to get system information1.5.0
getSystemInfoSyncSynchronous call to get system information1.5.1
getSystemInfoAsyncAsynchronous get system information1.5.1
getWindowInfoGet window information1.5.1
getSystemSettingGet device settings1.5.0
openSystemBluetoothSettingJump to system Bluetooth settings page1.5.1
openAppAuthorizeSettingJump to system host client authorization management page.1.5.1
getRendererUserAgentGet the UserAgent of Webview applet.1.5.1
getDeviceInfoGet basic device information.1.5.1
getAppBaseInfoGet basic host client information1.5.1
getAppAuthorizeSettingGet host client authorization settings1.5.1

1.3、Update

NameFunction DescriptionMinimum version
getUpdateManagerGet the globally unique version update manager for managing mini program updates.1.5.1
UpdateManager.applyUpdateForce mini program to restart and use the new version1.5.0
UpdateManager.onCheckForUpdateListen for the event of requesting Luffa background to check update results1.5.0
UpdateManager.onUpdateFailedListen for mini program update failure events1.5.0
UpdateManager.onUpdateReadyListen for mini program version update events1.5.0

1.4、Mini program

NameFunction DescriptionMinimum version
getLaunchOptionsSyncGet the parameters when the mini program is started1.5.0
getEnterOptionsSyncGet the parameters when the mini program is started this time1.5.1
onErrorListen for mini program error events1.5.0
offErrorRemove the listener function for mini program error events1.5.0
onThemeChangeListen for system theme change events1.5.0
offThemeChangeRemove the listener function for system theme change events1.5.0
onPageNotFoundListen for the event that the page to be opened by the mini program does not exist1.5.1
offPageNotFoundRemove the listener function for the event that the page to be opened by the mini program does not exist1.5.1
onAppShowListen for the mini program switching to the foreground event1.5.1
offAppShowRemove the listener function for the mini program switching to the foreground event1.5.1
onAppHideListen for the mini program switching to the background event1.5.1
offAppHideRemove the listener function for the mini program switching to the foreground event1.5.1
onUnhandledRejectionListen for unhandled Promise rejection events1.5.1
offUnhandledRejectionRemove the listener function for unhandled Promise rejection events1.5.1

1.5、Debug

NameFunction DescriptionMinimum version
setEnableDebugSet whether to turn on the debug switch1.5.0
getLogManagerGet the log manager object1.5.1
console.debugPrint debug logs to the debug panel1.5.0
console.errorPrint error logs to the debug panel1.5.0
console.groupCreate a new group in the debug panel1.5.0
console.groupEndEnd the group created by console.group1.5.0
console.infoPrint info logs to the debug panel1.5.0
console.logPrint log logs to the debug panel1.5.0
console.warnPrint warn logs to the debug panel1.5.0
LogManager.debugWrite debug logs1.5.0
LogManager.infoWrite info logs1.5.0
LogManager.logWrite log logs1.5.0
LogManager.warnWrite warn logs1.5.0
RealtimeLogManager.addFilterMsgAdd filter keywords1.5.16
RealtimeLogManager.errorWrite error logs1.5.16
RealtimeLogManager.getCurrentStateYou can get the current cache remaining space1.5.16
RealtimeLogManager.inSet the page where the real-time log page parameter is located1.5.16
RealtimeLogManager.infoWrite info logs1.5.16
RealtimeLogManager.setFilterMsgSet filter keywords1.5.16
RealtimeLogManager.warnWrite warn logs1.5.16
RealtimeTagLogManageraddFilterMsgAdd filter keywords1.5.16
RealtimeTagLogManager.errorWrite error logs1.5.16
RealtimeTagLogManager.infoWrite info logs1.5.16
RealtimeTagLogManager.setFilterMsgSet filter keywords1.5.16
RealtimeTagLogManager.warnWrite warn logs1.5.16

2、Routing

NameFunction DescriptionMinimum version
switchTabJump to the tabBar page and close all other non-tabBar pages1.5.0
reLaunchClose all pages and open to a page in the application1.5.0
redirectToClose the current page and jump to a page in the application1.5.0
navigateToKeep the current page and jump to a page in the application1.5.1
navigateBackClose the current page and return to the previous page or multiple pages1.5.0
EventChannelInter-page event communication channel1.5.1

3、Jump

NameFunction DescriptionMinimum version
exitMiniProgramExit the current applet1.5.0
navigateToMiniProgramOpen another applet1.5.0
navigateBackMiniProgramReturn to the previous applet. The call can only be successful when the current applet is opened by another applet.1.5.1

4、Forwarding

NameFunction DescriptionMinimum version
hideShareMenuHide the forward button of the current page1.5.0
showShareMenuShow the forward button of the current page1.5.0
updateShareMenuUpdate forwarding properties1.5.0
showShareImageMenuOpen the share picture pop-up window1.5.35
onCopyUrlListen for the event triggered when the user clicks the "Copy Link" button in the upper right corner menu1.5.35
offCopyUrlRemove all listener functions for the event triggered when the user clicks the "Copy Link" button in the upper right corner menu1.5.35

5、Interface

5.1、Interaction

NameFunction DescriptionMinimum version
hideLoadingHide the loading prompt box1.5.0
hideToastHide the message prompt box1.5.0
showActionSheetShow the operation menu1.5.0
showLoadingShow the loading prompt box1.5.0
showModalShow the modal dialog box1.5.0
showToastShow the message prompt box1.5.0
enableAlertBeforeUnloadOpen the applet page and return to the inquiry dialog box1.5.1
disableAlertBeforeUnloadClose the applet page and return to the inquiry dialog box1.5.1

5.2、Navigation Bar

NameFunction DescriptionMinimum version
setNavigationBarTitleDynamically set the title of the current page.1.5.0
setNavigationBarColorSet the color of the page navigation bar.1.5.0
hideHomeButtonHide the return to homepage button1.5.0
showNavigationBarLoadingDisplay the navigation bar loading animation on the current page1.5.1
hideNavigationBarLoadingHide the navigation bar loading animation on the current page1.5.1

5.3、Background

NameFunction DescriptionMinimum version
setBackgroundColorDynamically set the background color of the window1.5.0
setBackgroundTextStyleDynamically set the drop-down background font and loading image style1.5.0

5.4、TabBar

NameFunction DescriptionMinimum version
showTabBarDisplay tabBar.1.5.0
hideTabBarHide tabBar.1.5.0
setTabBarStyleDynamically set the overall style of tabBar.1.5.0
setTabBarItemDynamically set the content of a certain item of tabBar. From 2.7.0, images support temporary files and network files.1.5.0
showTabBarRedDotDisplay the red dot in the upper right corner of a certain item of tabBar.1.5.0
hideTabBarRedDotHide the red dot in the upper right corner of a certain item of tabBar.1.5.0
setTabBarBadgeAdd text to the upper right corner of a certain item of tabBar.1.5.0
removeTabBarBadgeRemove the text in the upper right corner of a certain item of tabBar.1.5.0

5.5、Pull Down To Refresh

NameFunction DescriptionMinimum version
startPullDownRefreshStart pull-down refresh.1.5.0
stopPullDownRefreshStop the current page pull-down refresh.1.5.0

5.6、Scroll

NameFunction DescriptionMinimum version
pageScrollToScroll the page to the target position, support selector and scroll distance positioning.1.5.0
ScrollViewContext.scrollIntoViewScroll to the specified position.1.5.0
ScrollViewContext.scrollToScroll to the specified position.1.5.0

5.7、Animation

NameFunction DescriptionMinimum version
createAnimationCreate an animation instance animation.1.5.0
Animation.backgroundColorSet the background color.1.5.0
Animation.bottomSet the bottom value.1.5.0
Animation.exportExport animation queue.1.5.0
Animation.heightSet height1.5.0
Animation.leftSet the left value1.5.0
Animation.matrixSame as transform-function matrix1.5.0
Animation.matrix3dSame as transform-function matrix3d1.5.0
Animation.opacitySet transparency1.5.0
Animation.rightSet right value1.5.0
Animation.rotateRotate clockwise from origin by an angle1.5.0
Animation.rotate3dRotate clockwise from fixed axis by an angle1.5.0
Animation.rotateXRotate clockwise from X axis by an angle1.5.0
Animation.rotateYRotate clockwise from Y axis by an angle1.5.0
Animation.rotateZRotate clockwise from Z axis by an angle1.5.0
Animation.scaleScale1.5.0
Animation.scale3dScale1.5.0
Animation.scaleXScale X axis1.5.0
Animation.scaleYScale Y axis1.5.0
Animation.scaleZScale Z axis1.5.0
Animation.skewTilt X and Y axis coordinates1.5.0
Animation.skewXTilt X axis coordinates1.5.0
Animation.skewYTilt Y axis coordinates1.5.0
Animation.stepIndicates that a set of animations is completed1.5.0
Animation.topSet top value1.5.0
Animation.translateTranslate transform1.5.0
Animation.translate3dTranslate xyz coordinates1.5.0
Animation.translateXTranslate X axis1.5.0
Animation.translateYTranslate Y axis1.5.0
Animation.translateZTranslate Z axis1.5.0
Animation.widthSet width1.5.0

5.8、Custom Components

NameFunction DescriptionMinimum version
nextTickDelay some operations to the next time slice1.5.0

5.9、Menu

NameFunction DescriptionMinimum version
getMenuButtonBoundingClientRectGet the layout position information of the menu button (the pill button in the upper right corner)1.5.0

5.10、Window

NameFunction DescriptionMinimum version
onWindowResizeListen to window size change events1.5.0
offWindowResizeRemove the listener function for window size change events1.5.1

5.11、Font

NameFunction DescriptionMinimum version
loadFontFaceDynamically load network fonts1.5.0

6、Network

6.1、Initiate Request

NameFunction DescriptionMinimum version
requestInitiate HTTPS network requests1.5.0
RequestTask.abortInterrupt request tasks1.5.0
RequestTask.onChunkReceivedListen to Transfer-Encoding Chunk Received events1.5.1
RequestTask.offChunkReceivedRemove the listener function for Transfer-Encoding Chunk Received events1.5.1
RequestTask.onHeadersReceivedListen to HTTP Response Header events1.5.0
RequestTask.offHeadersReceivedRemove the listener function for HTTP Response Header events1.5.0

6.2、Upload

NameFunction DescriptionMinimum version
uploadFileUpload local resources to the server1.5.0
UploadTask.abortInterrupt upload tasks1.5.0
UploadTask.onProgressUpdateListen to upload progress change events1.5.0
UploadTask.offProgressUpdateCancel listening to upload progress change events1.5.0
UploadTask.onHeadersReceivedListen to HTTP Response Header events1.5.0
UploadTask.offHeadersReceivedRemove the listener function for HTTP Response Header events1.5.0

6.3、Download

NameFunction DescriptionMinimum version
downloadFileDownload 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 200MB1.5.1
DownloadTask.abortInterrupt download tasks1.5.1
DownloadTask.onProgressUpdateListen to download progress change events1.5.1
DownloadTask.offProgressUpdateRemove the listener function for download progress change events1.5.1
DownloadTask.onHeadersReceivedListen for HTTP Response Header events1.5.1
DownloadTask.offHeadersReceivedRemove the listener function for HTTP Response Header events1.5.1

6.4、WebSocket

NameFunction DescriptionMinimum version
sendSocketMessageSend data through WebSocket connection. You need to call wx.connectSocket first, and send after the wx.onSocketOpen callback1.5.1
onSocketOpenListen for WebSocket connection opening events1.5.1
onSocketMessageListen for WebSocket receiving server message events1.5.1
onSocketErrorListen for WebSocket error events1.5.1
onSocketCloseListen for WebSocket connection closing events1.5.1
connectSocketCreate a WebSocket connection1.5.1
closeSocketClose the WebSocket connection1.5.1
SocketTask.closeClose the WebSocket connection1.5.0
SocketTask.onCloseListen for WebSocket connection closing events1.5.0
SocketTask.onErrorListen for WebSocket error events1.5.0
SocketTask.onMessageListen for WebSocket receiving server message events1.5.0
SocketTask.onOpenListen for WebSocket connection opening events1.5.0
SocketTask.sendSend data through WebSocket connection1.5.0

6.5、Udp Communication

NameFunction DescriptionMinimum version
createUDPSocketCreate a UDP Socket instance1.5.1
UDPSocket.bindBind an available port randomly assigned by the system, or bind a specified port number1.5.1
UDPSocket.closeClose the UDP Socket instance1.5.1
UDPSocket.connectPre-connect to the specified IP and port, and need to be used with the write method1.5.1
UDPSocket.onCloseListen for closing events.1.5.1
UDPSocket.offCloseRemove the listener function for closing events.1.5.1
UDPSocket.onErrorListen for error events.1.5.1
UDPSocket.offErrorRemove the listener function for error events.1.5.1
UDPSocket.onListeningListen for events that start listening for data packet messages.1.5.1
UDPSocket.offListeningRemove the listener function for events that start listening for data packet messages.1.5.1
UDPSocket.onMessageListen for events that receive messages.1.5.1
UDPSocket.offMessageRemove the listener function of the event that receives the message.1.5.1
UDPSocket.sendSend a message to the specified IP and port1.5.1
UDPSocket.setTTLSet the IP_TTL socket option to set the maximum number of hops allowed when transmitting an IP packet1.5.16
UDPSocket.writeUsage is the same as the send method1.5.16

6.6、Tcp Communication

NameFunction DescriptionMinimum version
createTCPSocketCreate a TCP Socket instance1.5.1
TCPSocket.bindWifiBind 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.closeClose the connection1.5.1
TCPSocket.connectStart a connection on the given socket1.5.1
TCPSocket.onCloseListen for this event once the socket is completely closed1.5.1
TCPSocket.offCloseRemove the listener function that emits this event once the socket is completely closed1.5.1
TCPSocket.onConnectListen for this event when a socket connection is successfully established1.5.1
TCPSocket.offConnectRemove the listener function that triggers this event when a socket connection is successfully established1.5.1
TCPSocket.onErrorListen for this event when an error occurs1.5.1
TCPSocket.offErrorRemove the listener function that triggers this event when an error occurs1.5.1
TCPSocket.onMessageListen for this event when data is received1.5.1
TCPSocket.offMessageRemove the listener function that triggers this event when data is received1.5.1
TCPSocket.onBindWifiListen for this event when a socket is successfully bound to the current Wi-Fi network1.5.1
TCPSocket.offBindWifiRemove the listener function that triggers this event when a socket is successfully bound to the current Wi-Fi network1.5.1
TCPSocket.writeSend data on the socket1.5.1

6.7、mDNS

NameFunction DescriptionMinimum version
stopLocalServiceDiscoveryStop searching for mDNS Service1.5.1
startLocalServiceDiscoveryStart searching for mDNS services in the LAN1.5.1
offLocalServiceResolveFailRemove the listener function for events where mDNS service resolution fails1.5.1
onLocalServiceResolveFailListen for events where mDNS service resolution fails1.5.1
offLocalServiceLostRemove the listener function for events where mDNS service leaves1.5.1
onLocalServiceLostListen for events where mDNS service leaves1.5.1
offLocalServiceFoundRemove the listener function for events where mDNS service discovers1.5.1
onLocalServiceFoundListen for events where mDNS service discovers1.5.1
offLocalServiceDiscoveryStopRemove the listener function for events where mDNS service stops searching1.5.1
onLocalServiceDiscoveryStopListen for events where mDNS service stops searching1.5.1

7、Data Cache

NameFunction DescriptionMinimum version
setStorageStore data in the specified key in the local cache1.5.0
setStorageSyncStore data in the specified key in the local cache1.5.0
revokeBufferURLDestroy data in memory according to the URL1.5.35
removeStorageRemove the specified key from the local cache1.5.0
removeStorageSyncSynchronous version of removeStorage1.5.0
getStorageAsynchronously obtain the content of the specified key from the local cache1.5.0
createBufferURLCreate a unique URL in memory based on the passed buffer1.5.35
getStorageSyncSynchronously obtain the content of the specified key from the local cache1.5.0
getStorageInfoAsynchronously obtain the relevant information of the current storage1.5.0
getStorageInfoSyncSynchronous version of getStorageInfo1.5.0
clearStorageClear the local data cache1.5.0
clearStorageSyncSynchronous version of clearStorage1.5.0
batchSetStorageBatch store data in the specified key in the local cache1.5.16
batchSetStorageSyncSynchronous version of batchSetStorage1.5.16
batchGetStorageAsynchronously obtain the content of the specified key from the local cache.1.5.16
batchGetStorageSyncSynchronous version of batchGetStorage1.5.16

8、Data Analysis

NameFunction DescriptionMinimum version
reportEventEvent reporting1.5.16

9、Canvas

9.1、Canvas Overview

NameFunction DescriptionMinimum version
createOffscreenCanvasCreate an off-screen canvas instance1.5.19
createCanvasContextCreate a CanvasContext object for the canvas drawing context1.5.0
canvasToTempFilePathExport the content of the specified area of 1.5.0
canvasPutImageDataDraw pixel data to the canvas1.5.0
canvasGetImageDataGet the implicit pixel data of the canvas area1.5.0
ImagePicture object1.5.16
ImageDataImageData object1.5.16
RenderingContextCanvas drawing context1.5.16

9.2、canvasContext

NameFunction DescriptionMinimum version
CanvasContext.arcCreate an arc1.5.0
CanvasContext.arcToDraw an arc path based on control points and radius1.5.0
CanvasContext.beginPathStart creating a path1.5.0
CanvasContext.bezierCurveToCreate a cubic Bezier curve path1.5.0
CanvasContext.clearRectClear the contents of the canvas within the rectangular area1.5.0
CanvasContext.clipCut any shape and size from the original canvas1.5.0
CanvasContext.closePathClose a path1.5.0
CanvasContext.createCircularGradientCreate a circular gradient color1.5.0
CanvasContext.createLinearGradientCreate a linear gradient color1.5.0
CanvasContext.createPatternCreate a method for creating a pattern for the specified image, which can repeat the meta-image in the specified direction1.5.0
CanvasContext.drawDraw the previous description (path, transformation, style) in the drawing context to the canvas1.5.0
CanvasContext.drawImageDraw the image to the canvas1.5.0
CanvasContext.fillFill the contents of the current path1.5.0
CanvasContext.fillRectFill a rectangle1.5.0
CanvasContext.fillTextDraw the filled text on the canvas1.5.0
CanvasContext.lineToAdd a new point and then create a line from the last specified point to the target point1.5.0
CanvasContext.measureTextMeasure text size information1.5.0
CanvasContext.moveToMove the path to the specified point in the canvas without creating a line1.5.0
CanvasContext.quadraticCurveToCreate a quadratic Bezier curve path1.5.0
CanvasContext.rectCreate a rectangular path1.5.0
CanvasContext.restoreRestore the previously saved drawing context1.5.0
CanvasContext.rotateRotate the current coordinate axis clockwise around the origin1.5.0
CanvasContext.saveSave the drawing context1.5.0
CanvasContext.scaleAfter calling, the horizontal and vertical coordinates of the paths created later will be scaled1.5.0
CanvasContext.setFillStyleSet the fill color1.5.0
CanvasContext.setFontSizeSet the font size1.5.0
CanvasContext.setGlobalAlphaSet the global brush transparency1.5.0
CanvasContext.setLineCapSet the endpoint style of the line1.5.0
CanvasContext.setLineDashSet the dashed line style1.5.0
CanvasContext.setLineJoinSet the intersection style of the line1.5.0
CanvasContext.setLineWidthSet the line width1.5.0
CanvasContext.setMiterLimitSet the maximum miter length1.5.0
CanvasContext.setShadowSet the shadow style1.5.0
CanvasContext.setStrokeStyleSet the stroke color1.5.0
CanvasContext.setTextAlignSet the text alignment.1.5.0
CanvasContext.setTextBaselineSet the vertical alignment of the text1.5.0
CanvasContext.setTransformUse a matrix to reset (override) the current transformation1.5.0
CanvasContext.strokeDraw the border of the current path1.5.0
CanvasContext.strokeRectDraw a rectangle (not filled)1.5.0
CanvasContext.strokeTextDraw the text stroke at a given (x, y) position1.5.0
CanvasContext.transformUse a matrix to overlay the current transformation multiple times1.5.0
CanvasContext.translateTransform the origin (0, 0) of the current coordinate system1.5.0

9.3、CanvasGradient

NameFunction DescriptionMinimum version
CanvasGradient.addColorStopAdd a color gradient point1.5.0

9.4、Canvas

NameFunction DescriptionMinimum version
Canvas.cancelAnimationFrameCancel the animation request added to the schedule by requestAnimationFrame1.5.16
Canvas.createImageDataCreate an ImageData object1.5.16
Canvas.createImageCreate an image object1.5.16
Canvas.createPath2DCreate a Path2D object1.5.16
Canvas.getContextThis method returns the drawing context of the Canvas.1.5.16
Canvas.requestAnimationFrameExecuted at the next redraw1.5.16
Canvas.toDataURLReturns a data URl containing the image display1.5.16

9.5、OffscreenCanvas

NameFunction DescriptionMinimum version
OffscreenCanvas.createImageThis method returns the drawing context of the OffscreenCanvas1.5.16
OffscreenCanvas.getContextCreate an image object1.5.16

9.6、Path2D

NameFunction DescriptionMinimum version
Path2D.addPathAdd a path to the current path1.5.16
Path2D.arcAdd a circular path1.5.16
Path2D.arcToAdd a circular path with a given control point1.5.16
Path2D.bezierCurveToAdd a cubic Bezier curve path1.5.16
Path2D.closePathClose the path to the starting point1.5.16
Path2D.ellipseAdd an elliptical arc path1.5.16
Path2D.lineToAdd a straight path1.5.16
Path2D.moveToMove the starting point of the path1.5.16
Path2D.quadraticCurveToAdd a quadratic Bezier curve path1.5.16
Path2D.rectAdd a square path1.5.16

10、Media

10.1、Map

NameFunction DescriptionMinimum version
createMapContextCreate a map context MapContext object1.5.0
MapContext.addArcAdd an arc1.5.16
MapContext.addCustomLayerAdd a personalized layer1.5.16
MapContext.addGroundOverlayCreate a custom image layer1.5.16
MapContext.addMarkersAdd a marker1.5.0
MapContext.eraseLinesErase or gray out the line segment added to the map1.5.16
MapContext.fromScreenLocationGet the longitude and latitude corresponding to the point on the screen, with the origin of the coordinates at the upper left corner of the map1.5.0
MapContext.getCenterLocationGet the longitude and latitude of the center of the current map1.5.0
MapContext.getRegionGet the field of view of the current map1.5.0
MapContext.getRotateGet the rotation angle of the current map1.5.0
MapContext.getScaleGet the zoom level of the current map1.5.0
MapContext.getSkewGet the tilt angle of the current map1.5.0
MapContext.includePointsZoom in the field of view to display all longitude and latitude1.5.0
MapContext.initMarkerClusterConfigure initial point aggregation1.5.16
MapContext.moveAlongMove the marker along the specified path for scenarios such as track playback1.5.0
MapContext.moveToLocationMove the center of the map to the current location point. At this time, you need to set the map component show-location to true1.5.0
MapContext.onListen to map events1.5.16
MapContext.openMapAppPull up the map APP and select navigation1.5.0
MapContext.removeArcDelete the arc1.5.16
MapContext.removeCustomLayerRemove the personalized layer1.5.16
MapContext.removeGroundOverlayRemove the custom image layer1.5.16
MapContext.removeMarkersRemove the marker1.5.0
MapContext.setBoundaryLimit the display range of the map1.5.16
MapContext.setCenterOffsetSet the center point offset of the map1.5.16
MapContext.setLocMarkerIconSet the location point icon1.5.16
MapContext.toScreenLocationGet the screen coordinates corresponding to the latitude and longitude1.5.16
MapContext.translateMarkerTranslate the marker with animation1.5.0
MapContext.updateGroundOverlayUpdate the custom image layer.1.5.16

10.2、Image

NameFunction DescriptionMinimum version
chooseImageSelect an image from the local album or take a photo with the camera.1.5.0
compressImageCompress the image interface, with optional compression quality.1.5.1
getImageInfoGet image information1.5.0
previewImagePreview the image in full screen on a new page1.5.0
previewMediaPreview images and videos1.5.1
saveImageToPhotosAlbumSave the image to the system album.1.5.1

10.3、Real-Time Audio And Video

NameFunction DescriptionMinimum version
createLivePusherContextCreate a live-pusher context LivePusherContext object1.5.0
createLivePlayerContextCreate a live-player context LivePlayerContext object1.5.0
LivePlayerContext.exitfullscreenExit full screen.1.5.0
LivePlayerContext.muteMute1.5.0
LivePlayerContext.pausePause1.5.0
LivePlayerContext.playPlay1.5.0
LivePlayerContext.requestFullScreenEnter full screen.1.5.0
LivePlayerContext.resumeRestore1.5.0
LivePlayerContext.snapshotTake a screenshot1.5.0
LivePlayerContext.stopStop1.5.0
LivePusherContext.startStart streaming and start camera preview at the same time1.5.0
LivePusherContext.stopStop streaming and stop camera preview at the same time1.5.0
LivePusherContext.pausePause streaming1.5.0
LivePusherContext.resumeResume streaming1.5.0
LivePusherContext.switchCameraSwitch front and back cameras1.5.0
LivePusherContext.snapshotSnapshot1.5.0
LivePusherContext.toggleTorchToggle flashlight1.5.0
LivePusherContext.playBGMPlay background sound1.5.0
LivePusherContext.stopBGMStop background sound1.5.0
LivePusherContext.pauseBGMPause background sound1.5.0
LivePusherContext.resumeBGMResume background sound1.5.0
LivePusherContext.setBGMPositionSet background sound progress1.5.0
LivePusherContext.setMICVolumeSet the microphone volume1.5.0
LivePusherContext.setBGMVolumeSet the background volume1.5.0
LivePusherContext.setAudioReverbTypeSet the mixing type1.5.0
LivePusherContext.startPreviewEnable camera preview1.5.0
LivePusherContext.stopPreviewDisable camera preview1.5.0
LivePusherContext.startAudioRecordStart recording1.5.0
LivePusherContext.stopAudioRecordStop recording1.5.0

10.4、Audio

NameFunction DescriptionMinimum version
stopVoiceStop playing speech1.5.1
playVoiceStart playing speech1.5.1
pauseVoicePause the currently playing speech1.5.1
setInnerAudioOptionSet the playback options of InnerAudioContext1.5.0
getAvailableAudioSourcesGet the currently supported audio input sources1.5.1
createInnerAudioContextCreate an InnerAudioContext object for the internal 'audio' component context1.5.0
AudioContext.pausePause audio1.5.1
AudioContext.playPlay audio1.5.1
AudioContext.seekJump to the specified position1.5.1
AudioContext.setSrcSet the audio address1.5.1
InnerAudioContext.destroyDestroy the current instance1.5.0
InnerAudioContext.offCanplayRemove the listener function for the event that the audio enters the playable state1.5.0
InnerAudioContext.offEndedRemove the listener function for the event that the audio is naturally played to the end1.5.0
InnerAudioContext.offErrorRemove the listener function for the audio playback error event1.5.0
InnerAudioContext.offPauseRemove the listener function for the audio pause event1.5.0
InnerAudioContext.offPlayRemove the listener function for the audio playback event1.5.0
InnerAudioContext.offSeekedRemove the listener function for the audio jump operation event1.5.0
InnerAudioContext.offSeekingRemove the listener function for the audio jump operation event1.5.0
InnerAudioContext.offStopRemove the listener function for the audio stop event1.5.0
InnerAudioContext.offTimeUpdateRemove the listener function for the audio playback progress update event1.5.0
InnerAudioContext.offWaitingRemove the listener function for the audio loading event1.5.0
InnerAudioContext.onCanplayListen for the event that the audio enters the playable state1.5.0
InnerAudioContext.onEndedListen for the event that the audio is naturally played to the end1.5.0
InnerAudioContext.onErrorListen for the audio playback error event1.5.0
InnerAudioContext.onPauseListen for the audio pause event1.5.0
InnerAudioContext.onPlayListen for audio playback events1.5.0
InnerAudioContext.onSeekedListen for the event that the audio completes the jump operation1.5.0
InnerAudioContext.onSeekingListen for the event that the audio performs the jump operation1.5.0
InnerAudioContext.onStopListen for the audio stop event1.5.0
InnerAudioContext.onTimeUpdateListen for the audio playback progress update event1.5.0
InnerAudioContext.onWaitingListen for the audio loading event1.5.0
InnerAudioContext.pausePause1.5.0
InnerAudioContext.playPlay1.5.0
InnerAudioContext.seekJump to the specified position1.5.0
InnerAudioContext.stopStop1.5.0

10.5、Video

NameFunction DescriptionMinimum version
saveVideoToPhotosAlbumSave the video to the system album1.5.0
createVideoContextCreate a video context VideoContext object1.5.0
chooseVideoShoot a video or select a video from the mobile phone album1.5.0
compressVideoCompress the video interface1.5.1
chooseMediaShoot or select a picture or video from the mobile phone album1.5.1
VideoContext.exitFullScreenExit full screen.1.5.0
VideoContext.exitBackgroundPlaybackExit the background audio playback mode1.5.16
VideoContext.exitPictureInPictureExit the small window, this method can be called on any page1.5.16
VideoContext.hideStatusBarHide the status bar, only valid in iOS full screen1.5.0
VideoContext.pausePause the video1.5.0
VideoContext.playPlay the video1.5.0
VideoContext.requestFullScreenEnter full screen.1.5.0
VideoContext.requestBackgroundPlaybackEnter the background audio playback mode1.5.16
VideoContext.seekJump to the specified position1.5.0
VideoContext.sendDanmuSend a bullet comment1.5.0
VideoContext.showStatusBarShow the status bar, only valid in iOS full screen.1.5.0
VideoContext.stopStop the video1.5.0

10.6、Transparent Video

NameFunction DescriptionMinimum version
createAnimationVideoCreate the animation-video context AnimationVideoContext object1.5.0
AnimationVideoContext.playPlay the video1.5.0
AnimationVideoContext.pausePause the video1.5.0
AnimationVideoContext.seekJump to the specified position1.5.0

10.7、Camera

NameFunction DescriptionMinimum version
createCameraContextCreate the camera context CameraContext object1.5.0
CameraContext.onCameraFrameGet the Camera real-time frame data.1.5.0
CameraContext.setZoomSet the zoom level.1.5.0
CameraContext.startRecordStart recording.1.5.0
CameraContext.stopRecordEnd recording.1.5.0
CameraContext.takePhotoTake a photo.1.5.0
CameraFrameListener.startStart listening to frame data.1.5.0
CameraFrameListener.stopStop listening to frame data.1.5.0

10.8、Recording

NameFunction DescriptionMinimum version
startRecordStart recording1.5.1
stopRecordStop recording1.5.1
getRecorderManagerGet the globally unique recording manager RecorderManager1.5.0
RecorderManager.onErrorListen for recording error events1.5.0
RecorderManager.onFrameRecordedListen for events where files of a specified frame size have been recorded1.5.0
RecorderManager.onlnterruptionBeginListen for events where recording is interrupted due to system usage1.5.0
RecorderManager.onlnterruptionEndListen for events where recording is interrupted and ends1.5.0
RecorderManager.onPauseListen for events where recording is paused1.5.0
RecorderManager.onResumeListen for events where recording continues1.5.0
RecorderManager.onStartListen for events where recording starts1.5.0
RecorderManager.onStopListen for events where recording ends1.5.0
RecorderManager.pausePause recording1.5.0
RecorderManager.resumeContinue recording1.5.0
RecorderManager.startStart recording1.5.0
RecorderManager.stopPause recording1.5.0

10.9、Background Audio

NameFunction DescriptionMinimum version
stopBackgroundAudioStop playing music1.5.1
seekBackgroundAudioControl the progress of music playing1.5.1
playBackgroundAudioUse background player to play music1.5.1
pauseBackgroundAudioPause music and listen for music stop events1.5.1
onBackgroundAudioStopListen for music stop events1.5.1
onBackgroundAudioPlayListen for music playing events1.5.1
onBackgroundAudioPauseListen for music pause events1.5.1
getBackgroundAudioPlayerStateGet background music playing status1.5.1
getBackgroundAudioManagerGet the globally unique background audio manager1.5.1
BackgroundAudioManager.onCanplayListen for background audio entering the playable state1.5.16
BackgroundAudioManager.onEndedListen for background audio natural playback end events1.5.16
BackgroundAudioManager.onErrorListen for background audio playback error events1.5.16
BackgroundAudioManager.onNextListen for the user clicking the next song event in the system music playback panel (iOS only)1.5.16
BackgroundAudioManager.onPauseListen for background audio pause events1.5.16
BackgroundAudioManager.onPlayListen for background audio playback events1.5.16
BackgroundAudioManager.onPrevListen for the user clicking the previous song event in the system music playback panel (iOS only)1.5.16
BackgroundAudioManager.onSeekedListen for background audio completion jump operation events1.5.16
BackgroundAudioManager.onSeekingListen for background audio start jump operation events1.5.16
BackgroundAudioManager.onStopListen for background audio stop events1.5.16
BackgroundAudioManager.onTimeUpdateListen for background audio playback progress update events1.5.16
BackgroundAudioManager.onWaitingListen for audio loading events1.5.16
BackgroundAudioManager.pausePause music1.5.16
BackgroundAudioManager.playPlay music1.5.16
BackgroundAudioManager.seekJump to the specified position1.5.16
BackgroundAudioManager.stopStop music1.5.16

10.10、Rich Text

NameFunction DescriptionMinimum version
EditorContextEditorContext instance1.5.16
EditorContext.blurEditor loses focus and keyboard is closed at the same time1.5.16
EditorContext.clearClear editor content1.5.16
EditorContext.formatModify style1.5.16
EditorContext.getContentsGet editor content1.5.16
EditorContext.getSelectionTextGet the plain text content in the selected area of 1.5.16
EditorContext.insertDividerInsert dividing line1.5.16
EditorContext.insertImageInsert image1.5.16
EditorContext.insertTextOverwrite the current selection and set a text1.5.16
EditorContext.redoRestore1.5.16
EditorContext.removeFormatClear the style of the current selection1.5.16
EditorContext.scrollIntoViewMake the editor cursor scroll to the visible area of 1.5.16
EditorContext.setContentsInitialize the editor content1.5.16
EditorContext.undoUndo1.5.1

11、File

11.1、File overview

NameFunction DescriptionMinimum version
saveFileSave the file locally1.5.0
removeSavedFileDelete the local cache file.1.5.0
openDocumentOpen the document on a new page1.5.0
getSavedFileListGet the list of local cache files saved under this applet.1.5.0
getSavedFileInfoGet the file information of local files.1.5.0
getFileSystemManagerGet the globally unique file manager1.5.0
getFileInfoGet the file information.1.5.0
ReadResultFile reading results1.5.16
WriteResultFile writing results1.5.16

11.2、FileSystemManager

NameFunction DescriptionMinimum version
FileSystemManager.accessJudge whether the file/directory exists1.5.0
FileSystemManager.accessSyncSynchronous version of FileSystemManager.access1.5.0
FileSystemManager.appendFileAppend content to the end of the file1.5.0
FileSystemManager.appendFileSyncSynchronous version of FileSystemManager.appendFile1.5.0
FileSystemManager.closeClose the file1.5.16
FileSystemManager.closeSyncSynchronously close the file1.5.16
FileSystemManager.copyFileCopy the file1.5.0
FileSystemManager.copyFileSyncSynchronous version of FileSystemManager.copyFile1.5.0
FileSystemManager.fstatGet the status information of the file.1.5.16
FileSystemManager.fstatSyncSynchronously get the status information of the file.1.5.16
FileSystemManager.ftruncateTruncate the file contents FileSystemManager.open1.5.16
FileSystemManager.ftruncateSyncTruncate the file contents.1.5.16
FileSystemManager.getFileInfoGet the local temporary file or local cache file information under the applet.1.5.0
FileSystemManager.getSavedFileListGet the list of local cache files saved under this applet.1.5.0
FileSystemManager.mkdirCreate a directory1.5.0
FileSystemManager.mkdirSyncSynchronous version of FileSystemManager.mkdir1.5.0
FileSystemManager.openOpen the file and return the file descriptor1.5.16
FileSystemManager.openSyncSynchronously open the file and return the file descriptor.1.5.16
FileSystemManager.readRead the file1.5.16
FileSystemManager.readSyncRead the file1.5.16
FileSystemManager.readCompressedFileRead the local file contents of the specified compression type.1.5.16
FileSystemManager.readCompressedFileSyncSynchronously read the local file contents of the specified compression type.1.5.16
FileSystemManager.readdirRead the list of files in the directory1.5.0
FileSystemManager.readdirSyncSynchronous version of FileSystemManager.readdir1.5.0
FileSystemManager.readFileRead the local file content1.5.0
FileSystemManager.readFileSyncSynchronous version of FileSystemManager.readFile1.5.0
FileSystemManager.readZipEntryRead the files in the compressed package1.5.16
FileSystemManager.removeSavedFileDelete the local cache files saved under this applet1.5.0
FileSystemManager.renameRename the file1.5.0
FileSystemManager.renameSyncSynchronous version of FileSystemManager.rename1.5.0
FileSystemManager.rmdirDelete the directory1.5.0
FileSystemManager.rmdirSyncSynchronous version of FileSystemManager.rmdir1.5.0
FileSystemManager.saveFileSave temporary files to the local1.5.0
FileSystemManager.saveFileSyncSynchronous version of FileSystemManager.saveFile1.5.0
FileSystemManager.statGet the file Stats object1.5.0
FileSystemManager.statSyncSynchronous version of FileSystemManager.stat1.5.0
FileSystemManager.truncateTruncate the file contents.1.5.16
FileSystemManager.truncateSyncTruncate the file content (Synchronous version of truncate)1.5.16
FileSystemManager.unlinkDelete the file1.5.0
FileSystemManager.unlinkSyncSynchronous version of FileSystemManager.unlink1.5.0
FileSystemManager.unzipUnzip the file1.5.0
FileSystemManager.writeWrite the file1.5.16
FileSystemManager.writeSyncWrite the file synchronously1.5.16
FileSystemManager.writeFileWrite the file1.5.0
FileSystemManager.writeFileSyncThe synchronous version of FileSystemManager.writeFile1.5.0

11.3、Stats

NameFunction DescriptionMinimum version
Stats.isDirectoryDetermine whether the current file is a directory1.5.0
Stats.isFileDetermine whether the current file is a normal file1.5.0

12、Open Interface

12.1、Login

NameFunction DescriptionMinimum version
loginCall the interface to obtain the login credentials (code)1.5.1
checkSessionCheck whether the login state has expired1.5.1

12.2、Account information

NameFunction DescriptionMinimum version
getAccountInfoSyncGet the current account information1.5.1

12.3、User information

NameFunction DescriptionMinimum version
getUserProfileGet user information1.5.1
getUserInfoObtain user information, user authorization scope.userInfo is required during use.1.5.1
userInfoUser information1.5.0

12.4、Settings

NameFunction DescriptionMinimum version
AuthSettingUser authorization setting information1.5.0
getSettingGet the user's current settings1.5.0
openSettingCall the client applet settings interface and return the operation results set by the user1.5.0

12.5、Biometric authentication

NameFunction DescriptionMinimum version
checkIsSoterEnrolledInDeviceVerify whether the biometric information is entered in the device.1.5.0
checkIsSupportSoterAuthenticationVerify whether the device supports biometric authentication.1.5.0
startSoterAuthenticationStart biometric authentication1.5.0

12.6、Authorization

NameFunction DescriptionMinimum version
authorizeInitiate an authorization request to the user in advance1.5.0

13、Location

NameFunction DescriptionMinimum version
getLocationGet the current geographic location and speed.1.5.0
choosePoiOpen the POI list to select the location, supporting fuzzy positioning (accurate to the city) and precise positioning mixed selection1.5.0
chooseLocationOpen the map to select the location1.5.0
stopLocationUpdateTurn off monitoring real-time location changes, and stop receiving messages in both the front and back ends1.5.0
startLocationUpdateBackgroundOpen the applet to receive location messages when entering the front and back ends, and guide the user to turn on 'authorization'1.5.0
startLocationUpdateOpen the applet to receive location messages when entering the foreground.1.5.0
openLocationUse Luffa's built-in map to view the location1.5.0
onLocationChangeErrorTriggered when the continuous positioning interface fails to return1.5.0
onLocationChangeMonitor real-time location change events, which must be used in conjunction with startLocationUpdateBackground and startLocationUpdate1.5.0
offLocationChangeErrorRemove the trigger when the continuous positioning interface fails to return1.5.0
offLocationChangeCancel monitoring real-time location change events1.5.0
getFuzzyLocationGet the current fuzzy location1.5.0

14、Device

14.1、Bluetooth General

NameFunction DescriptionMinimum version
stopBluetoothDevicesDiscoveryStop searching for nearby Bluetooth peripherals1.5.0
startBluetoothDevicesDiscoveryStart searching for nearby Bluetooth peripherals1.5.0
openBluetoothAdapterInitialize the Bluetooth module1.5.1
getConnectedBluetoothDevicesGet connected Bluetooth devices based on the main service UUID1.5.1
getBluetoothDevicesGet all Bluetooth devices searched during the Bluetooth module is effective.1.5.1
getBluetoothAdapterStateGet the status of the local Bluetooth adapter.1.5.1
closeBluetoothAdapterTurn off the Bluetooth module1.5.1
onBluetoothDeviceFoundListen for events of searching for new devices1.5.0
offBluetoothDeviceFoundRemove all listener functions for events of searching for new devices.1.5.0
onBluetoothAdapterStateChangeMonitor Bluetooth adapter status change events.1.5.0
offBluetoothAdapterStateChangeRemove all listener functions for Bluetooth adapter status change events.1.5.0
makeBluetoothPairBluetooth pairing interface, only supported by Android1.5.0
isBluetoothDevicePairedQuery whether the Bluetooth device is paired, only supported by Android.1.5.0

14.2、Bluetooth-Low Power Central Device

NameFunction DescriptionMinimum version
writeBLECharacteristicValueWrite binary data to the characteristic value of a Bluetooth low energy device1.5.1
readBLECharacteristicValueRead binary data of the characteristic value of a Bluetooth low energy device1.5.1
setBLEMTUNegotiate and set the maximum transmission unit of Bluetooth low energy1.5.1
getBLEMTUGet the maximum transmission unit of Bluetooth low energy1.5.1
onBLEMTUChangeListen for the change event of the maximum transmission unit of Bluetooth low energy (only triggered by Android)1.5.1
offBLEMTUChangeRemove the listener function of the change event of the maximum transmission unit of Bluetooth low energy1.5.1
onBLEConnectionStateChangeListen for the change event of the connection state of Bluetooth low energy1.5.1
offBLEConnectionStateChangeRemove the listener function of the change event of the connection state of Bluetooth low energy1.5.1
onBLECharacteristicValueChangeListen for the characteristic value change event of Bluetooth low energy device1.5.1
offBLECharacteristicValueChangeRemove all listeners for characteristic value change events of Bluetooth low energy devices1.5.1
notifyBLECharacteristicValueChangeEnable the notify function when characteristic value of Bluetooth low energy devices changes, and subscribe to characteristics1.5.1
getBLEDeviceServicesGet all services of Bluetooth low energy devices (services)1.5.1
getBLEDeviceRSSIGet the signal strength of Bluetooth low energy devices1.5.1
getBLEDeviceCharacteristicsGet all characteristics of a service of Bluetooth low energy devices1.5.1
createBLEConnectionConnect Bluetooth low energy devices1.5.1
closeBLEConnectionDisconnect from Bluetooth low energy devices1.5.1

14.3、Bluetooth-Low Power Peripheral Device

NameFunction DescriptionMinimum version
onBLEPeripheralConnectionStateChangedListen for events of current peripheral devices being connected or disconnected1.5.1
offBLEPeripheralConnectionStateChangedRemove listeners for events of current peripheral devices being connected or disconnected.1.5.1
createBLEPeripheralServerEstablish a local server as a Bluetooth low energy peripheral device1.5.1
BLEPeripheraServer.addServiceAdd services.1.5.1
BLEPeripheraServer.removeServiceRemove services.1.5.1
BLEPeripheraServer.startAdvertisingStart broadcasting locally created peripheral devices1.5.1
BLEPeripheraServer.stopAdvertisingStop broadcasting1.5.1
BLEPeripheraServer.writeCharacteristicValueWrite binary data values 1.5.1
BLEPeripheraServer.onCharacteristicWriteRequestListen for events of connected devices requesting to write characteristic values 1.5.1
BLEPeripheraServer.offCharacteristicWriteRequestRemove listeners for events of connected devices requesting to write characteristic values 1.5.1
BLEPeripheraServer.onCharacteristicReadRequestListen for events of connected devices requesting to read characteristic values 1.5.1
BLEPeripheraServer.offCharacteristicReadRequestRemove listeners for events of connected devices requesting to read characteristic values 1.5.1
BLEPeripheraServer.onCharacteristicSubscribedListen for characteristic subscription events, only supported by iOS1.5.1
BLEPeripheraServer.offCharacteristicSubscribedRemove listeners for characteristic subscription events1.5.1
BLEPeripheraServer.onCharacteristicUnsubscribedListen for the feature subscription cancellation event, only supported by iOS1.5.1
BLEPeripheraServer.offCharacteristicUnsubscribedRemove the listener function for the feature subscription cancellation event1.5.1

14.4、Bluetooth-Beacon

NameFunction DescriptionMinimum version
stopBeaconDiscoveryStop searching for nearby Beacon devices1.5.1
startBeaconDiscoveryStart searching for nearby Beacon devices1.5.1
onBeaconUpdateListen for Beacon device update events, only one listener can be registered1.5.1
offBeaconUpdateRemove all listener functions for Beacon device update events1.5.1
onBeaconServiceChangeListen for Beacon service status change events, only one listener can be registered1.5.1
offBeaconServiceChangeRemove all listener functions for Beacon service status change events1.5.1
getBeaconsGet all searched Beacon devices1.5.1
BeaconInfoBeacon devices1.5.1

14.5、NFC

14.5.1、getNFCAdapter

NameFunction DescriptionMinimum version
getNFCAdapterGet NFC instances1.5.0

14.5.2、NFCAdapter

NameFunction DescriptionMinimum version
NFCAdapter.startDiscoveryTurn on devices1.5.0
NFCAdapter.stopDiscoveryTurn off devices1.5.0
NFCAdapter.getNdefGet Ndef instances, which support reading and writing NDEF data on NFC tags in NDEF format1.5.0
NFCAdapter.getNfcAGet NfcA instances, which support reading and writing NFC-A (ISO 14443-3A) standards1.5.0
NFCAdapter.getNfcBGet NfcB instances, which support reading and writing NFC-B (ISO 14443-3B) standards1.5.0
NFCAdapter.getNfcFGet NfcF instances, which support reading and writing NFC-F (JIS 6319-4) standards1.5.0
NFCAdapter.getNfcVGet NfcV instances, which support reading and writing NFC-V (ISO 15693) standards1.5.0
NFCAdapter.getIsoDepGet IsoDep instances, which support reading and writing ISO-DEP (ISO 14443-4) standards1.5.0
NFCAdapter.getMifareClassicGet MifareClassic instances, which support reading and writing MIFARE Classic tags1.5.0
NFCAdapter.getMifareUltralightGet MifareUltralight instances, which support reading and writing MIFARE Ultralight tags1.5.0
NFCAdapter.onDiscoveredMonitor NFC Tag1.5.0
NFCAdapter.offDiscoveredRemove NFC Tag listener function1.5.0

14.5.3、IsoDep

NameFunction DescriptionMinimum version
IsoDep.connectConnect NFC tag1.5.0
IsoDep.closeDisconnect1.5.0
IsoDep.setTimeoutSet timeout1.5.0
IsoDep.isConnectedCheck if connected1.5.0
IsoDep.getMaxTransceiveLengthGet maximum transmission length1.5.0
IsoDep.transceiveSend data1.5.0
IsoDep.getHistoricalBytesGet reset information1.5.0

14.5.4、MifareClassic

NameFunction DescriptionMinimum version
MifareClassic.connectConnect NFC tag1.5.0
MifareClassic.closeDisconnect1.5.0
MifareClassic.setTimeoutSet timeout1.5.0
MifareClassic.isConnectedCheck if connected1.5.0
MifareClassic.getMaxTransceiveLengthGet maximum transmission length1.5.0
MifareClassic.transceiveSend data1.5.0

14.5.5、MifareUltralifght

NameFunction DescriptionMinimum version
MifareUltralifght.connectConnect NFC tag1.5.0
MifareUltralifght.closeDisconnect1.5.0
MifareUltralifght.setTimeoutSet timeout1.5.0

| MifareUltralifght.getMaxTransceiveLength | Get maximum transmission length | 1.5.0 | | MifareUltralifght.transceive | Send data | 1.5.0 |

14.5.6、Ndef

NameFunction DescriptionMinimum version
Ndef.connectConnect NFC tag1.5.0
Ndef.closeDisconnect1.5.0
Ndef.setTimeoutSet timeout1.5.0
Ndef.isConnectedCheck if connected1.5.0
Ndef.offNdefMessageCancel listening for Ndef messages1.5.0
Ndef.onNdefMessageListen for Ndef messages1.5.0
Ndef.writeNdefMessageRewrite Ndef tag content1.5.0

14.5.7、NfcA

NameFunction DescriptionMinimum version
NfcA.connectConnect NFC tag1.5.0
NfcA.closeDisconnect1.5.0
NfcA.setTimeoutSet timeout1.5.0
IsoDep.isConnectedCheck if connected1.5.0
NfcA.getMaxTransceiveLengthGet maximum transmission length1.5.0
NfcA.transceiveSend data1.5.0
NfcA.getAtqaGet ATQA information1.5.0
NfcA.getSakGet SAK information1.5.0

14.5.8、NfcB

NameFunction DescriptionMinimum version
NfcB.connectConnect NFC tag1.5.0
NfcB.closeDisconnect1.5.0
NfcB.setTimeoutSet timeout1.5.0
NfcB.isConnectedCheck if connected1.5.0
NfcB.getMaxTransceiveLengthGet maximum transmission length1.5.0
NfcB.transceiveSend data1.5.0

14.5.9、NfcF

NameFunction DescriptionMinimum version
NfcF.connectConnect NFC tag1.5.0
NfcF.closeDisconnect1.5.0
NfcF.setTimeoutSet timeout1.5.0
NfcF.isConnectedCheck if connected1.5.0
NfcF.getMaxTransceiveLengthGet maximum transmission length1.5.0
NfcF.transceiveSend data1.5.0

14.5.10、NfcV

NameFunction DescriptionMinimum version
NfcV.connectConnect NFC tag1.5.0
NfcV.closeDisconnect1.5.0
NfcV.setTimeoutSet timeout1.5.0
NfcV.isConnectedCheck if connected1.5.0
NfcV.getMaxTransceiveLengthGet maximum transmission length1.5.0
NfcV.transceiveSend data1.5.0

14.6、WiFi

NameFunction DescriptionMinimum version
onWifiConnectedListen for events connected to Wi-Fi1.5.1
offWifiConnectedRemove listener function for events connected to Wi-Fi1.5.1
stopWifiTurn off Wi-Fi module1.5.0
startWifiInitialize Wi-Fi module1.5.0
onGetWifiListListen for events of getting Wi-Fi list data1.5.0
offGetWifiListRemove listener function for events of getting Wi-Fi list data1.5.0
getConnectedWifiGet connected Wi-Fi information1.5.0
WifiInfoWifi information1.5.1

14.7、Calendar

NameFunction DescriptionMinimum version
addPhoneRepeatCalendarAdd recurring events to system calendar1.5.1
addPhoneCalendarAdd events to system calendar1.5.1

14.8、Clipboard

NameFunction DescriptionMinimum version
setClipboardDataSet system clipboard content1.5.1
getClipboardDataGet system clipboard content1.5.1

14.9、Network

NameFunction DescriptionMinimum version
onNetworkStatusChangeListen for network status change events1.5.1
getNetworkTypeGet network type1.5.1
offNetworkStatusChangeRemove listener function for network status change events1.5.1

14.10、Encryption

NameFunction DescriptionMinimum version
getRandomValuesGet cryptographically secure random numbers1.5.1

14.11、Keyboard

NameFunction DescriptionMinimum version
onKeyboardHeightChangeListen for keyboard height change events1.5.1
hideKeyboardAfter input, textarea, etc. focus on pulling up the keyboard, manually call this interface to close the keyboard1.5.1
offKeyboardHeightChangeRemove listener function for keyboard height change events1.5.1
getSelectedTextRangeAfter input, textarea, etc. focus on, get the cursor position of the input box1.5.1

14.12、Phone

NameFunction DescriptionMinimum version
makePhoneCallMake a call1.5.1

14.13、Accelerometer

NameFunction DescriptionMinimum version
startAccelerometerStart listening for acceleration data1.5.1
stopAccelerometerStop listening for acceleration data1.5.1
onAccelerometerChangeListen for acceleration data events1.5.1
offAccelerometerChangeRemove listener function for acceleration data events1.5.1

14.14、Compass

NameFunction DescriptionMinimum version
startCompassStart listening for compass data1.5.0
stopCompassStop listening for compass data1.5.0
onCompassChangeListen for compass data change events1.5.0
offCompassChangeRemove listener function for compass data change events1.5.0

14.15、Gyroscope

NameFunction DescriptionMinimum version
startGyroscopeStart listening for gyroscope data1.5.1
stopGyroscopeStop listening for gyroscope data1.5.1
onGyroscopeChangeListen for gyroscope data change events1.5.1
offGyroscopeChangeRemove the listener function for gyroscope data change events1.5.1

14.16、Scan Code

NameFunction DescriptionMinimum version
scanCodeCall up the client code scanning interface to scan the code1.5.0

14.17、Sms

NameFunction DescriptionMinimum version
sendSmsPull up the mobile phone to send text messages interface1.5.1

14.18、Vibration

NameFunction DescriptionMinimum version
vibrateShortMake the mobile phone vibrate for a short time (15 ms)1.5.1
vibrateLongMake the mobile phone vibrate for a long time (400 ms)1.5.1

14.19、Contact

NameFunction DescriptionMinimum version
chooseContactPull up the mobile phone address book and select a contact1.5.1
addPhoneContactAdd a mobile phone address book contact1.5.1

14.20、Battery

NameFunction DescriptionMinimum version
getBatteryInfoSyncThe synchronous version of wx.getBatteryInfo1.5.1
getBatteryInfoGet the device power1.5.1

14.21、Screen

NameFunction DescriptionMinimum version
setVisualEffectOnCaptureSet the screen performance when taking screenshots/recording1.5.1
setScreenBrightnessSet the screen brightness1.5.1
setKeepScreenOnSet whether to keep it always on1.5.1
onUserCaptureScreenListen for user active screenshot events1.5.1
onScreenRecordingStateChangedListen for user recording events1.5.1
offUserCaptureScreenUser active screenshot events1.5.1
offScreenRecordingStateChangedRemove the listener function for user recording events1.5.1
getScreenRecordingStateQuery whether the user is recording1.5.1
getScreenBrightnessGet the screen brightness1.5.1

14.22、Device Orientation

NameFunction DescriptionMinimum version
stopDeviceMotionListeningStop listening for changes in device orientation1.5.1
startDeviceMotionListeningStart listening for changes in device orientation1.5.1
onDeviceMotionChangeListen for device orientation change events1.5.1
offDeviceMotionChangeRemove the listener function for device orientation change events1.5.1

14.23、Memory

NameFunction DescriptionMinimum version
onMemoryWarningListen for low memory warning events1.5.1
offMemoryWarningRemove the listener function for low memory warning events1.5.1

14.24、Accessibility

NameFunction DescriptionMinimum version
checkIsOpenAccessibilityDetect whether visual accessibility is enabled1.5.1

15、WXML

15.1、WXML Summary

NameFunction DescriptionMinimum version
createSelectorQueryReturns a SelectorQuery object instance1.5.0
createIntersectionObserverCreates and returns an IntersectionObserver object instance1.5.0

15.2、IntersectionObserve

NameFunction DescriptionMinimum version
IntersectionObserve.relativeToUses the selector to specify a node as one of the reference areas1.5.0
IntersectionObserve.relativeToViewportSpecifies the page display area as one of the reference areas.1.5.0
IntersectionObserve.disconnectStop monitoring. The callback function will no longer be triggered.1.5.0
IntersectionObserve.observeSpecifies the target node and starts monitoring the intersection state changes.1.5.0

15.3、NodesRef

NameFunction DescriptionMinimum version
NodesRef.fieldsGets node related information1.5.0
NodesRef.boundingClientRectAdds a query request for the layout position of the node1.5.0
NodesRef.scrollOffsetAdds a query request for the scroll position of the node1.5.0
NodesRef.contextAdds a query request for the Context object of the node1.5.0
NodesRef.nodeGets the Node node instance1.5.0

15.4、SelectorQuery

NameFunction DescriptionMinimum version
SelectorQuery.execExecutes all requests1.5.0
SelectorQuery.inChanges the selection range of the selector to the custom component component1.5.0
SelectorQuery.selectSelects the first node that matches the selector selector in the current page1.5.0
SelectorQuery.selectAllSelects all nodes that match the selector selector in the current page.1.5.0
SelectorQuery.selectViewportSelects the display area1.5.0

15.5、meidaQueryObserver

NameFunction DescriptionMinimum version
MediaQueryObserver.disconnectStops monitoring.1.5.16
MediaQueryObserver.observeStarts monitoring the page media query changes.1.5.16

16、Custom Api

NameFunction DescriptionMinimum version
invokeNativePluginCustom Api1.5.0