API overview
# 1. foundation
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.env | Environment variable | 1.0.0 | |
| ft.base64ToArrayBuffer | Convert the Base64 string to the ArrayBuffer object | 1.0.0 | |
| ft.arrayBufferToBase64 | Convert the ArrayBuffer object to the Base64 string | 1.0.0 |
# 1.1 System
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.getSystemInfoSync | The sync version of wx.getSystemInfo | 1.0.0 | |
| ft.getSystemInfoAsync | Asynchronously get system information | 1.0.0 | |
| ft.getSystemInfo | Get System Information | 1.0.0 |
# 1.2 Update
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.getUpdateManager | Gets the globally unique version update manager for managing MiniApp update | 1.0.0 |
# 1.3 MiniApp
# 1.3.1 Life Cycle
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.getLaunchOptionsSync | Gets the parameters | when the MiniApp starts 1.0.0 | |
| ft.getEnterOptionsSync | Get the parameter | when the Mini App starts 1.0.0 |
# 1.3.2 Application-level events
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.onPageNotFound | The page that the listener MiniApp is going to open does not have an event | 1.0.0 | |
| ft.onError | Listen for MiniApp error events | 1.0.0 | |
| ft.onAppShow | The listener program cuts the front desk event | 1.0.0 | |
| ft.onAppHide | Listening for the Mini App cuts background events | 1.0.0 | |
| ft.offPageNotFound | Cancel listening for the page that the MiniApp is going to open does not have an event | 1.0.0 | |
| ft.offError | Cancels the listening MiniApp error event | 1.0.0 | |
| ft.offAppShow | Cancel the listening MiniApp to cut the front-end event | 1.0.0 | |
| ft.offAppHide | Cancel the listening MiniApp to cut background events | 1.0.0 |
| Name | Feature Description |
|---|---|
| ft.onUnhandledRejection | Listen for unhandled Promise rejection events |
| ft.onThemeChange | Listen to system subject change events |
| ft.onAudioInterruptionEnd | Monitor the audio interrupt end event |
| ft.onAudioInterruptionBegin | Monitor audio is interrupted because it is occupied by the system Start Event |
| ft.offUnhandledRejection | Cancels the listening for unhandled Promise rejection events |
| ft.offThemeChange | Cancel listening for system subject change events |
| ft.offAudioInterruptionEnd | Cancel monitoring of audio interrupt end event |
| ft.offAudioInterruptionBegin | Unmonitored audio was interrupted because it was consumed by the system Start Event |
# 1.4 debugging
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.setEnableDebug | Sets whether the Debug Switch | is turned on 1.0.0 |
| Name | Feature Description |
|---|---|
| ft.getRealtimeLogManager | Gets the real-time log manager object |
| ft.getLogManager | Gets the Log Manager Object |
# 1.5 Performance
| Name | Feature Description |
|---|---|
| ft.reportPerformance | Mini App speed measurement reporting |
| ft.getPerformance | Gets information about the current MiniApp performance |
# 1.6 encryption
| Name | Feature Description |
|---|---|
| ft.getUserCryptoManager | Gets the user encryption module |
# 2. routing
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.switchTab | Jump to the tabBar page and close all other non-tabBar pages | 1.0.0 | |
| ft.reLaunch | Close all pages to open a page within the app | 1.0.0 | |
| ft.redirectTo | Close the current page and jump to a page within the app | 1.0.0 | |
| ft.navigateTo | Keep the current page and jump to a page within the app | 1.0.0 | |
| ft.navigateBack | Closes the current page to return to the previous page or multi-level page | 1.0.0 |
# 3. Jump
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.navigateToMiniProgram | Open another MiniApp | 1.0.0 | |
| ft.navigateBackMiniProgram | Return to the previous MiniApp | 1.0.0 | |
| ft.exitMiniProgram | Exits the current MiniApp | 1.0.0 |
# 4. forward
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.showShareMenu | Displays the Forward button | for the current page 1.0.0 | |
| ft.hideShareMenu | Hides the Forward button | for the current page 1.0.0 |
| Name | Feature Description |
|---|---|
| ft.updateShareMenu | Update the Forwarding Properties |
| ft.showShareImageMenu | Open the Share Image pop-up to send the image to a friend, favorite, or download |
| ft.shareVideoMessage | Forward the video to the chat |
| ft.shareFileMessage | Forward files to chat |
| ft.onCopyUrl | Listens for events that are triggered when the user clicks the "Copy Link" button in the upper-right menu |
| ft.offCopyUrl | Unmonitor the event that is triggered when the user clicks the "Copy Link" button in the upper-right menu |
| ft.getShareInfo | Get forwarding details |
| ft.authPrivateMessage | Verify the private message |
# 5. interface
# 5.1 Interaction
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.showToast | Displays the message prompt box | 1.0.0 | |
| ft.showModal | Displays the Modal Dialog | 1.0.0 | |
| ft.showLoading | Displays the loading prompt box | 1.0.0 | |
| ft.showActionSheet | The Actions menu | is displayed 1.0.0 | |
| ft.hideToast | Hide the message prompt box | 1.0.0 | |
| ft.hideLoading | Hides the loading prompt box | 1.0.0 | |
| ft.enableAlertBeforeUnload | Open the MiniApp page to return to the | of the ask dialog box 2.11.5 | |
| ft.disableAlertBeforeUnload | Close the MiniApp page to return to the ask dialog | 2.11.5 |
# 5.2 Navigation bar
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.showNavigationBarLoading | Displays the navigation bar loading animation | on the current page 1.0.0 | |
| ft.setNavigationBarTitle | Dynamically sets the title of the current page | 1.0.0 | |
| ft.setNavigationBarColor | Sets the page navigation bar color | 1.0.0 | |
| ft.hideNavigationBarLoading | Hides the navigation bar load animation | on the current page 1.0.0 |
| Name | Feature Description |
|---|---|
| ft.hideHomeButton | Hide the Back to Home button |
# 5.3 Background
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.setBackgroundTextStyle | Dynamically set the drop-down background font, loading chart style | 1.0.0 | |
| ft.setBackgroundColor | Dynamically sets the background color of the window | 1.0.0 |
# 5.4 Tab Bar
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.showTabBarRedDot | Displays the red dot | in the upper-right corner of a tabBar item 1.0.0 | |
| ft.showTabBar | Displays the tabBar | 1.0.0 | |
| ft.setTabBarStyle | Dynamically set the overall style of the tabBar | 1.0.0 | |
| ft.setTabBarItem | Dynamically set the content of tabBar for an item, and from 2.7.0, the picture supports temporary files and network files | 1.0.0 | |
| ft.setTabBarBadge | Add text to the upper-right corner of a tabBar item | 1.0.0 | |
| ft.removeTabBarBadge | Removes the text | in the upper-right corner of a tabBar item 1.0.0 | |
| ft.hideTabBarRedDot | Hides the red dot | in the upper-right corner of a tabBar item 1.0.0 | |
| ft.hideTabBar | Hides the tabBar | 1.0.0 |
# 5.5 fonts
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.loadFontFace | Dynamically load network fonts with a file address of download type | 1.0.0 |
# 5.6 pull-down refresh
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.stopPullDownRefresh | Stops the current page drop-down refresh | 1.0.0 | |
| ft.startPullDownRefresh | Start pull-down refresh | 1.0.0 |
# 5.7 Scroll
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.pageScrollTo | Scrolling the page to the target position supports two ways to position the | by selector and scroll distance 1.0.0 |
# 5.8 Animation
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.createAnimation | Create an animation instance animation | 1.0.0 |
# 5.9 Pin
| Name | Feature Description |
|---|---|
| ft.setTopBarText | Dynamically set the top bar text content |
# 5.10 Custom components
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.nextTick | Delays a portion of the operation until the next time slice before executing | 1.0.0 |
# 5.11 Menu
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.getMenuButtonBoundingClientRect | Gets the layout location information for the menu button (capsule button in the upper-right corner) | 1.0.0 |
# 5.12 Window
| Name | Feature Description |
|---|---|
| ft.setWindowSize | Set the window size, the interface is only available for PC platforms, see the guidelines for details |
| ft.onWindowResize | Listen for window size change events |
| ft.offWindowResize | Suppress listening for window size change events |
# 6. Internet
# 6.1 Initiates a request
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.request | Initiate an HTTPS network request | 1.0.0 |
# 6.2 Download
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.downloadFile | Download the file resource to the local | 1.0.0 |
# 6.3 Upload
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.uploadFile | Upload local resources to the server | 1.0.0 |
# 6.4 WebSocket
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.sendSocketMessage | Send data over a WebSocket connection | 1.0.0 | |
| ft.onSocketOpen | Listen for WebSocket connection open events | 1.0.0 | |
| ft.onSocketMessage | Listens for WebSocket message events that are accepted to the server | 1.0.0 | |
| ft.onSocketError | Listen for WebSocket error event | 1.0.0 | |
| ft.onSocketClose | Listen for WebSocket connection closure events | 1.0.0 | |
| ft.connectSocket | Create a WebSocket connection | 1.0.0 | |
| ft.closeSocket | Close the WebSocket connection | 1.0.0 |
# 6.5 mDNS
| Name | Feature Description |
|---|---|
| ft.stopLocalServiceDiscovery | Stop searching for the mDNS service |
| ft.startLocalServiceDiscovery | Start searching for the mDNS service under the lan |
| ft.onLocalServiceResolveFail | The mDNS service listens for event |
| ft.onLocalServiceLost | Listen for events that the mDNS service leaves |
| ft.onLocalServiceFound | Listen for event |
| ft.onLocalServiceDiscoveryStop | The event |
| ft.offLocalServiceResolveFail | Cancels the |
| ft.offLocalServiceLost | Cancels the |
| ft.offLocalServiceFound | Cancels the event |
| ft.offLocalServiceDiscoveryStop | Cancels the event |
# 6.6 TCP communication
| Name | Feature Description |
|---|---|
| ft.createTCPSocket | Create a TCP Socket instance |
# 6.7 UDP communication
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.createUDPSocket | Create a UDP Socket instance | 1.0.0 |
# 7. pay
| Name | Feature Description |
|---|---|
| ft.requestPayment | Initiate a payment |
| ft.requestOrderPayment | Create a custom version of the trading component order and initiate a payment |
# 8. Data caching
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.setStorageSync | The synchronization version of wx.setStorage | 1.0.0 | |
| ft.setStorage | Stores data in the key specified in the local cache | 1.0.0 | |
| ft.removeStorageSync | The synchronized version of wx.removeStorage | 1.0.0 | |
| ft.removeStorage | Removes the specified key | from the local cache 1.0.0 | |
| ft.getStorageSync | The synchronization version of wx.getStorage | 1.0.0 | |
| ft.getStorageInfoSync | The sync version of wx.getStorageInfo | 1.0.0 | |
| ft.getStorageInfo | Asynchronously gets information about the current storage | 1.0.0 | |
| ft.getStorage | Asynchronously gets the content | of the specified key from the local cache 1.0.0 | |
| ft.clearStorageSync | The synchronized version of wx.clearStorage | 1.0.0 | |
| ft.clearStorage | Clean up the local data cache | 1.0.0 |
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.revokeBufferURL | Destroys data that exists in memory based on the URL | 1.0.0 | |
| ft.createBufferURL | Creates a unique URL based on incoming buffers that exist in memory | 1.0.0 |
# 8.1 periodic updates
| Name | Feature Description |
|---|---|
| ft.setBackgroundFetchToken | Set a custom login state that is brought with you when periodically pulling data, so that the third-party server can verify the legitimacy of the request |
| ft.onBackgroundFetchData | Listen for a callback |
| ft.getBackgroundFetchToken | Gets the custom login state |
| ft.getBackgroundFetchData | Pull backgroundFetch client cache data |
# 9. data analysis
| Name | Feature Description |
|---|---|
| ft.reportMonitor | Customize the service data monitoring and reporting interface |
| ft.reportEvent | Incident escalation |
| ft.reportAnalytics | Custom analysis data reporting interface |
| ft.getExptInfoSync | Given an array of experimental parameters, obtain the corresponding experimental parameter values |
# 10. canvas
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.createCanvasContext | Create the canvas of the drawing context of the CanvasContext object | 1.0.0 | |
| ft.canvasToTempFilePath | Exports the contents of the specified area of the current canvas to generate a picture | of the specified size 1.0.0 | |
| ft.canvasPutImageData | Draw pixel data to the canvas | 1.0.0 | |
| ft.canvasGetImageData | Gets the pixel data implied by the canvas area | 1.0.0 |
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.createOffscreenCanvas | Create an off-screen canvas instance | 1.0.0 |
# 11. media
# 11.1 Map
| Name | Feature Description |
|---|---|
| ft.createMapContext | Create a map context mapContext object |
# 11.2 Images
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.saveImageToPhotosAlbum | Save the picture to the System Album | 1.0.0 | |
| ft.previewMedia | Preview pictures and videos | 1.0.0 | |
| ft.previewImage | Preview a picture in full screen on a new page | 1.0.0 | |
| ft.getImageInfo | Get picture information | 1.0.0 | |
| ft.compressImage | Compression image interface with optional compression quality | 1.0.0 | |
| ft.chooseMessageFile | Select the File | from the client session 1.0.0 | |
| ft.chooseImage | Select a picture from a local album or take a photo with your camera | 1.0.0 |
# 11.3 Video
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.saveVideoToPhotosAlbum | Save the video to the System Album | 1.0.0 | |
| ft.createVideoContext | Create a video context videoContext object | 1.0.0 | |
| ft.chooseVideo | Take a video or select a video from your phone album | 1.0.0 |
| Name | Feature Description |
|---|---|
| ft.openVideoEditor | Open the Video Editor |
| ft.getVideoInfo | Get the video details |
| ft.compressVideo | The compressed video interface |
| ft.chooseMedia | Take or select a picture or video from your phone's album |
# 11.4 Audio
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.stopVoice | End playing voice | 1.0.0 | |
| ft.setInnerAudioOption | Sets the playback options for InnerAudioContext | 1.0.0 | |
| ft.playVoice | Start playing the Voice | 1.0.0 | |
| ft.pauseVoice | Pause the voice | that is playing 1.0.0 | |
| ft.createInnerAudioContext | Create an inner audio context InnerAudioContext object | 1.0.0 | |
| ft.createAudioContext | Create an audio context the AudioContext object | 1.0.0 |
| Name | Feature Description |
|---|---|
| ft.getAvailableAudioSources | Gets the currently supported audio input source |
| ft.createWebAudioContext | Create a WebAudio context |
| ft.createMediaAudioPlayer | Create a media audio player object, a MediaAudioPlayer object, which can be used to play audio |
# 11.5 Live Audio & Video
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.createLivePusherContext | Create a live-pusher context LivePusherContext object | 1.0.0 | |
| ft.createLivePlayerContext | Create a live-player context livePlayerContext object | 1.0.0 |
# 11.6 Recording
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.stopRecord | Stop Recording | 1.0.0 | |
| ft.startRecord | Start Recording | 1.0.0 | |
| ft.getRecorderManager | Gets the globally unique recording manager RecorderManager | 1.0.0 |
# 11.7 Camera
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.createCameraContext | Create a camera context the CameraContext object | 1.0.0 |
# 11.8 Rich text
# 11.8.1 EditorContext
| Name | Feature Description | Version | Note |
|---|---|---|---|
| EditorContext.blur | The editor loses focus while the keyboard | 1.0.0 | |
| EditorContext.clear | Clear the Editor Contents | 1.0.0 | |
| EditorContext.format | Modify the style | 1.0.0 | |
| EditorContext.getContents | Gets the Editor Content | 1.0.0 | |
| EditorContext.getSelectionText | Gets the plain text content in the editor's selected area | 1.0.0 | |
| EditorContext.insertDivider | Insert the Dividing Line | 1.0.0 | |
| EditorContext.insertImage | Insert a picture | 1.0.0 | |
| EditorContext.insertText | Overrides the current selection, setting a piece of text | 1.0.0 | |
| EditorContext.redo | Restore | 1.0.0 | |
| EditorContext.removeFormat | Clears the style | of the current selection 1.0.0 | |
| EditorContext.scrollIntoView | Causes the editor cursor to scroll to the window within the visible area of the | 1.0.0 | |
| EditorContext.setContents | Initializes the editor content, and only delta takes effect when html and delta exist at the same time | 1.0.0 | |
| EditorContext.undo | Revoke | 1.0.0 |
# 11.9 Audio and Video Synthesis
| Name | Feature Description |
|---|---|
| ft.createMediaContainer | Create an audio-visual processing container that ultimately combines the tracks in the container into a video |
# 11.10 Real-time voice
| Name | Feature Description |
|---|---|
| ft.updateVoIPChatMuteConfig | Update the Live Voice Mute Settings |
| ft.subscribeVoIPVideoMembers | Subscribe to the video screen members |
| ft.onVoIPVideoMembersChanged | Listen for live voice call member video status change events |
| ft.onVoIPChatStateChanged | Listen for room state change events |
| ft.onVoIPChatSpeakersChanged | Listen for live voice call member call status change events |
| ft.onVoIPChatMembersChanged | Listen for live voice call member presence change events |
| ft.onVoIPChatInterrupted | Listen for passive disconnect real-time voice call events |
| ft.offVoIPVideoMembersChanged | Cancel listening for live voice call member video status change events |
| ft.offVoIPChatStateChanged | Cancels the listening for room state change events |
| ft.offVoIPChatMembersChanged | Cancel listening for live voice call member presence change events |
| ft.offVoIPChatInterrupted | Cancel monitoring passive disconnect real-time voice call events |
| ft.joinVoIPChat | Join (create) a live voice call, more information can be found in the Live Voice Guide |
| ft.exitVoIPChat | Exit (destroy) the live voice call |
# 11.11 Screen Recorder
| Name | Feature Description |
|---|---|
| ft.createMediaRecorder | Create a WebGL picture recorder that records frame-by-frame rendered footage on WebGL and exports video files |
# 11.12 Video Decoder
| Name | Feature Description |
|---|---|
| ft.createVideoDecoder | Create a video decoder that gets the decoded data frame by frame |
# 11.13 Background audio
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.getBackgroundAudioManager | Gets the globally unique Background Audio Manager. The MiniApp switches to the background, and if the audio is in the playback state, it can continue to play. However, background state cannot manipulate the playback state of audio by calling the API. | 2.12.12 |
# 12. location
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.openLocation | Use the built-in map to view the location | 1.0.0 | |
| ft.getLocation | Gets the current geographic location, speed, | 1.0.0 | |
| ft.choosePoi | Opens the POI list to select locations, supports fuzzy positioning (accurate to city) and precise positioning mixed | 2.12.1 | |
| ft.chooseLocation | Open the map to select a location | 1.0.0 |
| Name | Feature Description |
|---|---|
| ft.stopLocationUpdate | Turn off the monitoring for real-time location changes, and stop receiving messages |
| ft.startLocationUpdateBackground | When you open the Mini App to enter the front and back office, you receive location messages, and you need to guide the user to open the authorization |
| ft.startLocationUpdate | Open the Receive Location Message when the MiniApp enters the foreground |
| ft.onLocationChange | To listen to real-time geolocation change events, you need to use |
| ft.offLocationChange | Cancel listening for live geolocation change events |
# 13. file
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.saveFile | Save the file to a local | 1.0.0 | |
| ft.removeSavedFile | Delete the local cache file | 1.0.0 | |
| ft.openDocument | The new page opens the document | 1.0.0 | |
| ft.getSavedFileList | Gets the list of saved local cache files under the MiniApp | 1.0.0 | |
| ft.getSavedFileInfo | Gets the file information for the local file | 1.0.0 | |
| ft.getFileSystemManager | Gets the globally unique filer | 1.0.0 | |
| ft.getFileInfo | Get file information | 1.0.0 |
| Name | Feature Description |
|---|---|
| ft.saveFileToDisk | Save files from the file system to the user disk, only supported |
# 15. equipment
# 15.1 Bluetooth - Universal
| Name | Feature Description |
|---|---|
| ft.stopBluetoothDevicesDiscovery | Stop searching for nearby Bluetooth peripherals |
| ft.startBluetoothDevicesDiscovery | Start searching for nearby Bluetooth peripherals |
| ft.openBluetoothAdapter | Initialize the Bluetooth module |
| ft.onBluetoothDeviceFound | Listen for events that search for new devices |
| ft.onBluetoothAdapterStateChange | Listen for Bluetooth adapter state change events |
| ft.offBluetoothDeviceFound | Cancel the listening for events that find a new device |
| ft.offBluetoothAdapterStateChange | Cancels listening for Bluetooth adapter state change events |
| ft.makeBluetoothPair | Bluetooth pairing interface, only Android supports |
| ft.getConnectedBluetoothDevices | Get the connected Bluetooth device |
| ft.getBluetoothDevices | Gets all discovered Bluetooth devices during the Bluetooth module |
| ft.getBluetoothAdapterState | Gets the native Bluetooth adapter status |
| ft.closeBluetoothAdapter | Turn off the Bluetooth module |
# 15.2 Bluetooth-Low Energy Hub Device
| Name | Feature Description |
|---|---|
| ft.writeBLECharacteristicValue | Write binary data to the Bluetooth low energy device characteristic value |
| ft.setBLEMTU | Negotiate to set the Maximum Transmission Unit (MTU) |
| ft.readBLECharacteristicValue | Read binary data for bluetooth low energy device characteristics |
| ft.onBLEConnectionStateChange | Listen for Bluetooth low energy connection state change events |
| ft.onBLECharacteristicValueChange | Listens for feature change events for Bluetooth low energy devices |
| ft.offBLEConnectionStateChange | Cancels listening for changing events for Bluetooth low energy connection state |
| ft.offBLECharacteristicValueChange | Suppresses listening for feature change events for Bluetooth low energy devices |
| ft.notifyBLECharacteristicValueChange | Enable the notify feature when the characteristic value of a Bluetooth low energy device changes, subscribe to the feature |
| ft.getBLEDeviceServices | Gets the Bluetooth low energy device all service (service) |
| ft.getBLEDeviceRSSI | Gets the received Signal Strength Indication (RSSI) |
| ft.getBLEDeviceCharacteristics | Gets all characteristic |
| ft.createBLEConnection | Connect a Bluetooth low energy device |
| ft.closeBLEConnection | Disconnect from the Bluetooth low energy device |
# 15.3 Bluetooth- Low Energy Peripherals
| Name | Feature Description |
|---|---|
| ft.onBLEPeripheralConnectionStateChanged | Listens for the current peripheral device being connected or disconnected event |
| ft.offBLEPeripheralConnectionStateChanged | Cancels listening for the current peripheral connected or disconnected event |
| ft.createBLEPeripheralServer | Establish a server side that is local as a Bluetooth low energy peripheral to create multiple |
# 15.4 Bluetooth-Beacon
| Name | Feature Description |
|---|---|
| ft.stopBeaconDiscovery | Stop searching for nearby Beacon devices |
| ft.startBeaconDiscovery | Start searching for nearby Beacon devices |
| ft.onBeaconUpdate | Listens for Beacon device update events and can register only one listener |
| ft.onBeaconServiceChange | You can only register for beacon service state change events to register for only one listener |
| ft.offBeaconUpdate | Cancel listening for Beacon device update events |
| ft.offBeaconServiceChange | Cancel the |
| ft.getBeacons | Gets all searched Beacon device |
| BeaconInfo |
# 15.5 NFC
| Name | Feature Description |
|---|---|
| ft.stopHCE | Close the NFC Module |
| ft.startHCE | Initialize the NFC module |
| ft.sendHCEMessage | Send an NFC message |
| ft.onHCEMessage | Listening for incoming NFC device message events allows only one listener |
| ft.offHCEMessage | Receive NFC device message events, cancel event listening |
| ft.getNFCAdapter | Gets the NFC instance |
| ft.getHCEState | Determines whether the current device supports HCE Capability |
# 15.6 Wi-Fi
| Name | Feature Description |
|---|---|
| ft.stopWifi | Turn off the Wi-Fi module |
| ft.startWifi | Initialize the Wi-Fi module |
| ft.setWifiList | Set the information about the AP in the wifiList |
| ft.onWifiConnected | Listen for events connected to Wi-Fi |
| ft.onGetWifiList | Listen for data events that get to Wi-Fi list |
| ft.offWifiConnected | Cancels listening for events on a Wi-Fi connection |
| ft.offGetWifiList | Cancels listening for data events that get to Wi-Fi list |
| ft.getWifiList | Request a Wi-Fi list |
| ft.getConnectedWifi | Get Wi-Fi information in connected |
| ft.connectWifi | Connect to a Wi-Fi |
| WifiInfo | Wifi information |
# 15.7 Calendar
| Name | Feature Description |
|---|---|
| ft.addPhoneRepeatCalendar | Add a duplicate event |
| ft.addPhoneCalendar | Adds an event |
# 15.8 Contacts
| Name | Feature Description |
|---|---|
| ft.searchContacts | Find contacts and match similar phone numbers |
| ft.chooseContact | Pull up your phone's address book and select the Contacts |
| ft.addPhoneContact | Add a phone contacts |
# 15.9 Accessibility
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.checkIsOpenAccessibility | Detects whether the Visual Accessibility | is turned on 2.12.1 |
# 15.10 battery
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.getBatteryInfoSync | The sync version of wx.getBatteryInfo | 1.0.0 | |
| ft.getBatteryInfo | Gets the device charge | 1.0.0 |
# 15.11 Clipboard
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.setClipboardData | Sets the contents of the system clipboard | 1.0.0 | |
| ft.getClipboardData | Gets the contents of the system clipboard | 1.0.0 |
# 15.12 Network
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.onNetworkStatusChange | Listen for network state change events | 1.0.0 | |
| ft.offNetworkStatusChange | Cancel listening for network state change events, if the parameter is empty, cancel all event listening | 1.0.0 | |
| ft.getNetworkType | Gets the Network Type | 1.0.0 |
# 15.13 encryption
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.getRandomValues | Gets cryptographic secure random numbers | 1.0.0 |
# 15.14 screen
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.setScreenBrightness | Set screen brightness | 1.0.0 | |
| ft.setKeepScreenOn | Sets the keep on | 1.0.0 | |
| ft.onUserCaptureScreen | Listen for user active screenshot events | 1.0.0 | |
| ft.offUserCaptureScreen | User active screenshot event | 1.0.0 | |
| ft.getScreenBrightness | Gets the screen brightness | 1.0.0 |
# 15.15 Keyboard
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.onKeyboardHeightChange | Listen for keyboard height changes | 1.0.0 | |
| ft.offKeyboardHeightChange | Suppresses listening for keyboard height change events | 1.0.0 | |
| ft.hideKeyboard | After the keyboard is pulled up by focus such as input, textarea, etc., manually call this interface to retract the keyboard | 1.0.0 | |
| ft.getSelectedTextRange | After the input, textarea, and so on, get the cursor position of the input box | 1.0.0 |
# 15.16 Phone
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.makePhoneCall | Call | 1.0.0 |
# 15.17 Accelerometer
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.stopAccelerometer | Stop listening for acceleration data | 1.0.0 | |
| ft.startAccelerometer | Start listening for acceleration data | 1.0.0 | |
| ft.onAccelerometerChange | Listen for acceleration data events | 1.0.0 | |
| ft.offAccelerometerChange | Cancels listening for acceleration data events, and if the parameter is empty, cancels all event listening | 1.0.0 |
# 15.18 Compass
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.stopCompass | Stop listening to compass data | 1.0.0 | |
| ft.startCompass | Start listening for compass data | 1.0.0 | |
| ft.onCompassChange | Listen for compass data change events | 1.0.0 | |
| ft.offCompassChange | Cancel the listening for compass data change events, if the parameter is empty, cancel all event listening | 1.0.0 |
# 15.19 Device Orientation
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.stopDeviceMotionListening | Stop listening for changes in device orientation | 1.0.0 | |
| ft.startDeviceMotionListening | Start listening for changes in device orientation | 1.0.0 | |
| ft.onDeviceMotionChange | Listen for device orientation change events | 1.0.0 | |
| ft.offDeviceMotionChange | Cancels the listening device direction change event, and if the parameter is empty, cancels all event listening | 1.0.0 |
# 15.20 Gyroscope
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.stopGyroscope | Stop listening to gyroscope data | 1.0.0 | |
| ft.startGyroscope | Start listening for gyroscope data | 1.0.0 | |
| ft.onGyroscopeChange | Listen for gyroscope data change events | 1.0.0 | |
| ft.offGyroscopeChange | Cancel listening for gyroscope data change events | 1.0.0 |
# 15.21 MEMORY
| Name | Feature Description |
|---|---|
| ft.onMemoryWarning | Listen for out-of-memory alert events |
| ft.offMemoryWarning | Cancel listening for out-of-memory alarm events |
# 15.22 Scan code
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.scanCode | Turn up the client scan code interface to scan the code | 1.0.0 |
# 15.23 Vibration
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.vibrateShort | Causes the phone to vibrate for a shorter period of time (15 ms) | 1.0.0 | |
| ft.vibrateLong | Cause the phone to vibrate for a long time (400 ms) | 1.0.0 |
# 16. AI/face recognition
| Name | Feature Description |
|---|---|
| ft.stopFaceDetect | Stop face recognition |
| ft.initFaceDetect | Initialize the Face Recognition |
| ft.faceDetect | Face recognition, before use, need to be initialized once by wx.initFaceDetect, it is recommended to use the frame data returned by the camera interface |
# 17. Worker
| Name | Feature Description |
|---|---|
| ft.createWorker | Create a Worker thread |
# 18. FXML
| Name | Feature Description | Version | Note |
|---|---|---|---|
| ft.createSelectorQuery | Returns a SelectorQuery object instance | 1.0.0 | |
| ft.createIntersectionObserver | Creates and returns an intersectionObserver object instance | 1.0.0 |
# 18.1 IntersectionObserver
| Name | Feature Description | Version | Note |
|---|---|---|---|
| IntersectionObserver.disconnect | Stop listening | 1.0.0 | |
| IntersectionObserver.observe | Specify the target node and start listening for intersection state changes | 1.0.0 | |
| IntersectionObserver.relativeTo | Use the selector to specify a node as one of the reference regions | 1.0.0 | |
| IntersectionObserver.relativeToViewport | Specifies the page display area as one of the reference areas | 1.0.0 |
# 18.2 MediaQueryObserver
| Name | Feature Description | Version | Note |
|---|---|---|---|
| MediaQueryObserver.disconnect | Stop listening | 1.0.0 | |
| MediaQueryObserver.observe | Start listening for page media query changes | 1.0.0 |
# 18.3 NodesRef
| Name | Feature Description | Version | Note |
|---|---|---|---|
| NodesRef.boundingClientRect | Add the query request for the node's layout location | 1.0.0 | |
| NodesRef.context | Add a context object query request | node 1.0.0 | |
| NodesRef.fields | Get information about a node | 1.0.0 | |
| NodesRef.scrollOffset | Add a scroll position query request for nodes | 1.0.0 | |
| NodesRef.node | Gets the Node node instance | 2.12.12 |
# 18.4 SelectorQuery
| Name | Feature Description | Version | Note |
|---|---|---|---|
| SelectorQuery.exec | Execute all requests | 1.0.0 | |
| SelectorQuery.in | Change the selection range of the selector to the custom component within the component | 1.0.0 | |
| SelectorQuery.select | Under the current page, select the node | that matches the selector of the selector 1.0.0 | |
| SelectorQuery.selectAll | Under the current page, select All nodes that match the selector | 1.0.0 | |
| SelectorQuery.selectViewport | Select the Display Area | 1.0.0 |
# 19. Third-party platforms
| Name | Feature Description |
|---|---|
| ft.getExtConfigSync | The synchronized version of wx.getExtConfig |
| ft.getExtConfig | Gets the data field customized by the third-party platform |
# 20. ad
| Name | Feature Description |
|---|---|
| ft.createRewardedVideoAd | Create a rewarded video ad component |
| ft.createInterstitialAd | Create an interstitial ad component |
# 21. other
| Name | Feature Description |
|---|---|
| ft.onCustomEvent | Listen for natively distributed onCustomEvent events |
| ft.offCustomEvent | Cancel listening for natively distributed onCustomEvent events |
| ft.base64ToTempFilePath | Saves the base64 data for the image to the local sandbox and returns the local cache path |
Last update: 2022/08/16, 21:24:25