# API Overview

# 1. Basic

Name Description Version Remarks
ft.env Environment Variables 1.0.0
ft.canIUse Check if the Mini-Program's API, callback, parameters, components, etc. are available in the current version 1.0.0
ft.base64ToArrayBuffer Convert a Base64 string to an ArrayBuffer object 1.0.0
ft.arrayBufferToBase64 Convert an ArrayBuffer object to a Base64 string 1.0.0
ft.base64ToTempFilePath Save the base64 data of an image to the local sandbox and return the local cache path 1.0.0
ft.fileToBase64 Convert a file to a Base64 string 1.0.0

# 1.1 System

Name Description Version Remarks
ft.getSystemInfoSync Synchronous version of ft.getSystemInfo 1.0.0
ft.getSystemInfoAsync Asynchronously get system information 1.0.0
ft.getSystemInfo Get system information 1.0.0
ft.openSystemBluetoothSetting Navigate to the system Bluetooth settings page 3.0.45
ft.openAppAuthorizeSetting Navigate to the system authorization management page 3.0.45
ft.getWindowInfo Get window information 3.0.45
ft.getSystemSetting Get device settings 3.0.45
ft.getRendererUserAgent Get the UserAgent of the WebView Mini-Program 3.0.45
ft.getDeviceInfo Get basic device information 3.0.45
ft.getAppBaseInfo Get basic APP information 3.0.45
ft.getAppAuthorizeSetting Get APP authorization settings 3.0.45

Please Note

The following APIs are not yet supported

Name Description
ft.getSkylineInfoSync Synchronous version of ft.getSkylineInfo
ft.getSkylineInfo Get the support status of the current runtime environment for the Skyline rendering engine
ft.getDeviceBenchmarkInfo Get device performance score and model tier data

# 1.2 Update

Name Description Version Remarks
ft.getUpdateManager Get the globally unique version update manager for managing Mini-Program updates 1.0.0

Please Note

The following APIs are not yet supported

Name Description
ft.updateWeChatApp Update the client version

# 1.2.1 UpdateManager

Name Description Version Remarks
UpdateManager.applyUpdate Force the Mini-Program to restart and use the new version 1.0.0
UpdateManager.onCheckForUpdate Listen for the event of checking for update results from the FinClip backend 1.0.0
UpdateManager.onUpdateFailed Listen for the Mini-Program update failure event 1.0.0
UpdateManager.onUpdateReady Listen for the Mini-Program version update event 1.0.0

# 1.3 Mini-Program

# 1.3.1 Lifecycle

Name Description Version Remarks
ft.getLaunchOptionsSync Get the parameters when the Mini-Program is launched 1.0.0
ft.getEnterOptionsSync Get the parameters for this Mini-Program launch 1.0.0

Please Note

The following APIs are not yet supported

Name Description
ft.onApiCategoryChange Listen for API category change events
ft.offApiCategoryChange Stop listening for API category change events
ft.getApiCategory Get the current API category

# 1.3.2 Application-Level Events

Name Description Version Remarks
ft.onPageNotFound Listen for the event when the page to be opened by the Mini-Program does not exist 1.0.0
ft.onError Listen for Mini-Program error events 1.0.0
ft.onAppShow Listen for the Mini-Program switching to the foreground event 1.0.0
ft.onAppHide Listen for the Mini-Program switching to the background event 1.0.0
ft.offPageNotFound Stop listening for the event when the page to be opened by the Mini-Program does not exist 1.0.0
ft.offError Stop listening for Mini-Program error events 1.0.0
ft.offAppShow Stop listening for the Mini-Program switching to the foreground event 1.0.0
ft.offAppHide Stop listening for the Mini-Program switching to the background event 1.0.0
ft.onThemeChange Listen for system theme change events 1.0.0
ft.onUnhandledRejection Listen for unhandled Promise rejection events 1.0.0
ft.offUnhandledRejection Stop listening for unhandled Promise rejection events 1.0.0
ft.offThemeChange Stop listening for system theme change events 1.0.0

Please Note

The following APIs are not yet supported

Name Description
ft.postMessageToReferrerPage Send a message to the source page of the navigation
ft.postMessageToReferrerMiniProgram Send a message to the source Mini-Program of the navigation
ft.onAudioInterruptionEnd Listen for the audio interruption end event
ft.onAudioInterruptionBegin Listen for the event when audio is interrupted due to system occupation
ft.offAudioInterruptionEnd Stop listening for the audio interruption end event
ft.offAudioInterruptionBegin Stop listening for the event when audio is interrupted due to system occupation
ft.onLazyLoadError Listen for the callback when an application asynchronous component fails to load
ft.offLazyLoadError Stop listening for the callback when an application asynchronous component fails to load

# 1.3.3 Route Events

Name Description Version Remarks
ft.onAppRoute Listen for the event after the route logic is executed after the route event is dispatched 1.0.0
ft.offAppRoute Stop listening for the event 1.0.0
ft.onAppRouteDone Listen for the event when the current route animation execution is complete 1.0.0
ft.offAppRouteDone Stop listening for the event 1.0.0

Please Note

The following APIs are not yet supported

Name Description
ft.onBeforePageUnload Listen for the event before the existing page instance is destroyed due to a route event
ft.onBeforePageLoad Listen for the event before a new page instance is created due to a route event
ft.onBeforeAppRoute Listen for the event before the route logic is executed after the route event is dispatched
ft.onAfterPageUnload Listen for the event after the existing page instance is destroyed due to a route event
ft.onAfterPageLoad Listen for the event after a new page instance is created due to a route event
ft.offBeforePageUnload Remove the listener function for the route event
ft.offBeforePageLoad Remove the listener function for the route event
ft.offBeforeAppRoute Remove the listener function for the route event
ft.offAfterPageUnload Remove the listener function for the route event
ft.offAfterPageLoad Remove the listener function for the route event

# 1.4 Debugging

Name Description Version Remarks
ft.setEnableDebug Set whether to enable the debug switch 1.0.0

Please Note

The following APIs can be called but have no reporting functionality

Name Description
ft.getRealtimeLogManager Get the real-time log manager object
ft.getLogManager Get the log manager object

# 1.4.1 console

Name Description Version Remarks
console.debug Print debug logs to the debug panel 1.0.0
console.error Print error logs to the debug panel 1.0.0
console.group Create a new group in the debug panel 1.0.0
console.groupEnd End the group created by console.group 1.0.0
console.info Print info logs to the debug panel 1.0.0
console.log Print log logs to the debug panel 1.0.0
console.warn Print warn logs to the debug panel 1.0.0

# 1.4.2 LogManager

Name Description Version Remarks
LogManager.debug Write debug logs Note: Logs are only displayed in the local console 3.0.36
LogManager.info Write info logs Note: Logs are only displayed in the local console 3.0.36
LogManager.log Write log logs Note: Logs are only displayed in the local console 3.0.36
LogManager.warn Write warn logs Note: Logs are only displayed in the local console 3.0.36

# 1.4.3 RealtimeLogManager

Name Description Version Remarks
RealtimeLogManager.error Write error logs Note: Logs are only displayed in the local console 3.0.36
RealtimeLogManager.info Write info logs Note: Logs are only displayed in the local console 3.0.36
RealtimeLogManager.warn Write warn logs Note: Logs are only displayed in the local console 3.0.36
RealtimeLogManager.setFilterMsg Set filter keywords Note: Logs are only displayed in the local console 3.0.36
RealtimeLogManager.addFilterMsg Add filter keywords Note: Logs are only displayed in the local console 3.0.36

Please Note

The following APIs are not yet supported

Name Description
RealtimeLogManager.getCurrentState Real-time logs aggregate and report cached logs within a certain time interval. If the cached content exceeds the limit within that interval, it will be discarded
RealtimeLogManager.in Set the page where the real-time log page parameter is located
RealtimeLogManager.tag Get the log manager instance for a given tag

# 1.4.4 RealtimeTagLogManager

Please Note

The following APIs are not yet supported

Name Description
RealtimeTagLogManager.info Write info logs
RealtimeTagLogManager.warn Write warn logs
RealtimeTagLogManager.error Write error logs
RealtimeTagLogManager.insetFilterMsgfo Set filter keywords
RealtimeTagLogManager.addFilterMsg Add filter keywords

# 1.5 Performance

Name Description Version Remarks
ft.getPerformance Get performance-related information for the current Mini-Program Supported from Base Library 3.5.5 and SDK version 2.46.9
ft.preloadWebview Preload the WebView for the next page Supported from Base Library 3.5.5 and SDK version 2.46.9

Please Note

The following APIs are not yet supported

Name Description
ft.reportPerformance Mini-Program speed test reporting
ft.preloadSkylineView Preload the Skyline runtime environment required for the next page
ft.preloadAssets Preload media resource files for the View Layer

# 1.5.1 EntryList

Please Note

The following APIs are not yet supported

Name Description
EntryList.getEntries This method returns all performance data in the current list
EntryList.getEntriesByType Get all performance data of type [entryType] in the current list
EntryList.getEntriesByName Get all performance data with the name [name] and type [entryType] in the current list

# 1.5.2 Performance

Please Note

The following APIs are not yet supported

Name Description
Performance.getEntries This method returns all performance data in the current buffer
Performance.getEntriesByType Get all performance data of type [entryType] in the current buffer
Performance.getEntriesByName Get all performance data with the name [name] and type [entryType] in the current buffer
Performance.createObserver Create a global performance event listener
Performance.setBufferSize Set the buffer size, default buffer is 30 performance data entries
PerformanceEntry Single performance data entry

# 1.5.3 PerformanceObserver

Please Note

The following APIs are not yet supported

Name Description
PerformanceObserver.disconnect Stop monitoring
PerformanceObserver.observe Start monitoring

# 1.6 Subpackage Loading

Please Note

The following APIs are not yet supported

Name Description
ft.preDownloadSubpackage Trigger subpackage preload

# 1.6.1 PreDownloadSubpackageTask

Please Note

The following APIs are not yet supported

Name Description
PreDownloadSubpackageTask.onProgressUpdate Listen for subpackage loading progress change events

# 1.7 Encryption

Name Description Version
ft.getUserCryptoManager Get the user encryption module 3.2.2

# 1.7.1 UserCryptoManager

Name Description Version
UserCryptoManager.getLatestUserKey Get the latest user encryption key 3.2.2
UserCryptoManager.getRandomValues Get cryptographically secure random numbers 3.2.2

# 2. Routing

Name Description Version Notes
ft.switchTab Navigate to a tabBar page and close all other non-tabBar pages 1.0.0
ft.reLaunch Close all pages and open a page within the app 1.0.0
ft.redirectTo Close the current page and navigate to a page within the app 1.0.0
ft.navigateTo Keep the current page and navigate to a page within the app 1.0.0
ft.navigateBack Close the current page and return to the previous page or multiple pages 1.0.0

Please Note

The following APIs are not yet supported

Name Description
ft.router Custom route object

# 2.1 EventChannel

Name Description Version Notes
EventChannel.emit Trigger an event 1.0.0
EventChannel.off Cancel listening to an event 1.0.0
EventChannel.on Continuously listen to an event 1.0.0
EventChannel.once Listen to an event once, becomes invalid after triggering 1.0.0

# 3. Navigation

Name Description Version Notes
ft.navigateToMiniProgram Open another Mini-Program 1.0.0
ft.navigateBackMiniProgram Return to the previous Mini-Program 1.0.0
ft.exitMiniProgram Exit the current Mini-Program 1.0.0
ft.navigateToWechatMiniProgram Navigate to open a WeChat Mini-Program 1.0.0
ft.restartMiniProgram Restart the Mini-Program 3.1.17

Please Note

The following APIs are not yet supported

Name Description
ft.openOfficialAccountArticle Open an official account article through the Mini-Program
ft.openEmbeddedMiniProgram Open a half-screen Mini-Program
ft.onEmbeddedMiniProgramHeightChange Listen for the half-screen Mini-Program visible height change event
ft.offEmbeddedMiniProgramHeightChange Cancel listening for the half-screen Mini-Program visible height change event

# 4. Forward / Share

Name Description Version Notes
ft.showShareMenu Show the share button on the current page 1.0.0
ft.hideShareMenu Hide the share button on the current page 1.0.0

Please Note

The following APIs are not yet supported

Name Description
ft.updateShareMenu Update share attributes
ft.showShareImageMenu Open the share image popup, allowing users to send images to friends, favorites, or download
ft.shareVideoMessage Forward a video to a chat
ft.shareFileMessage Forward a file to a chat
ft.onCopyUrl Listen for the event triggered when the user clicks the "Copy Link" button in the top-right menu
ft.offCopyUrl Cancel listening for the event triggered when the user clicks the "Copy Link" button in the top-right menu
ft.getShareInfo Get detailed share information
ft.authPrivateMessage Verify private messages

# 5. UI

# 5.1 Interaction

Name Description Version Notes
ft.showToast Show a toast message 1.0.0
ft.showModal Show a modal dialog 1.0.0
ft.showLoading Show a loading indicator 1.0.0
ft.showActionSheet Show an action sheet 1.0.0
ft.hideToast Hide the toast message 1.0.0
ft.hideLoading Hide the loading indicator 1.0.0
ft.enableAlertBeforeUnload Enable the page return confirmation dialog for Mini-Program pages 2.11.5
ft.disableAlertBeforeUnload Disable the page return confirmation dialog for Mini-Program pages 2.11.5

# 5.2 Navigation Bar

Name Description Version Notes
ft.showNavigationBarLoading Show the navigation bar loading animation on the current page 1.0.0
ft.setNavigationBarTitle Dynamically set the title of the current page 1.0.0
ft.setNavigationBarColor Set the color of the page navigation bar 1.0.0
ft.hideNavigationBarLoading Hide the navigation bar loading animation on the current page 1.0.0
ft.hideHomeButton Hide the back-to-home button 1.0.0

# 5.3 Background

Name Description Version Notes
ft.setBackgroundTextStyle Dynamically set the style of the pull-down background font and loading indicator 1.0.0
ft.setBackgroundColor Dynamically set the background color of the window 1.0.0

# 5.4 Tab Bar

Name Description Version Notes
ft.showTabBarRedDot Show a red dot on the top-right corner of a tabBar item 1.0.0
ft.showTabBar Show 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 a tabBar item. From version 2.7.0, images support temporary files and network files 1.0.0
ft.setTabBarBadge Add text to the top-right corner of a tabBar item 1.0.0
ft.removeTabBarBadge Remove the text from the top-right corner of a tabBar item 1.0.0
ft.hideTabBarRedDot Hide the red dot on the top-right corner of a tabBar item 1.0.0
ft.hideTabBar Hide the tabBar 1.0.0

# 5.5 Font

Name Description Version Notes
ft.loadFontFace Dynamically load web fonts. The file address must be of a downloadable type 1.0.0

# 5.6 Pull-down Refresh

Name Description Version Notes
ft.stopPullDownRefresh Stop the current page's pull-down refresh 1.0.0
ft.startPullDownRefresh Start the pull-down refresh 1.0.0

# 5.7 Scrolling

# 5.7.1 ft.pageScrollTo

Name Description Version Notes
ft.pageScrollTo Scroll the page to a target position, supporting both selector and scroll distance positioning 1.0.0

# 5.7.2 ScrollViewContext

Name Description Version Notes
ScrollViewContext ScrollView operation instance, obtainable via the NodesRef.node method of ft.createSelectorQuery 3.0.45
ScrollViewContext.scrollIntoView Scroll to a specified position 3.0.45
ScrollViewContext.scrollTo Scroll to a specified position 3.0.45
ScrollViewContext.triggerRefresh Trigger a pull-down refresh 3.8.3
ScrollViewContext.closeRefresh Close the pull-down refresh 3.8.3

Please Note

The following APIs are not yet supported

Name Description
ScrollViewContext.closeTwoLevel Close the secondary pull-down
ScrollViewContext.triggerTwoLevel Trigger the secondary pull-down

# 5.8 Animation

Name Description Version Notes
ft.createAnimation Create an animation instance 1.0.0

# 5.8.1 Animation

Name Description Version Notes
Animation.export Export the animation queue 1.0.0
Animation.step Indicates the completion of a group of animations 1.0.0
Animation.matrix Same as transform-function matrix 1.0.0
Animation.matrix3d Same as transform-function matrix3d 1.0.0
Animation.rotate Rotate clockwise from the origin by an angle 1.0.0
Animation.rotate3d Rotate clockwise around a fixed axis by an angle 1.0.0
Animation.rotateX Rotate clockwise around the X-axis by an angle 1.0.0
Animation.rotateY Rotate clockwise around the Y-axis by an angle 1.0.0
Animation.rotateZ Rotate clockwise around the Z-axis by an angle 1.0.0
Animation.scale Scale 1.0.0
Animation.scale3d Scale 1.0.0
Animation.scaleX Scale on the X-axis 1.0.0
Animation.scaleY Scale on the Y-axis 1.0.0
Animation.scaleZ Scale on the Z-axis 1.0.0
Animation.skew Skew on the X and Y axes 1.0.0
Animation.skewX Skew on the X-axis 1.0.0
Animation.skewY Skew on the Y-axis 1.0.0
Animation.translate Translate transformation 1.0.0
Animation.translate3d Translate transformation on xyz coordinates 1.0.0
Animation.translateX Translate on the X-axis 1.0.0
Animation.translateY Translate on the Y-axis 1.0.0
Animation.translateZ Translate on the Z-axis 1.0.0
Animation.opacity Set opacity 1.0.0
Animation.backgroundColor Set background color 1.0.0
Animation.width Set width 1.0.0
Animation.height Set height 1.0.0
Animation.left Set the left value 1.0.0
Animation.right Set the right value 1.0.0
Animation.top Set the top value 1.0.0
Animation.bottom Set the bottom value 1.0.0

# 5.9 Top Bar

Please Note

The following APIs are not yet supported

Name Description
ft.setTopBarText Dynamically set the text content of the top bar

# 5.10 Custom Components

Name Description Version Notes
ft.nextTick Delay part of the operation to the next time slice for execution 1.0.0

# 5.11 Menu

Name Description Version Notes
ft.getMenuButtonBoundingClientRect Get the layout position information of the menu button (capsule button in the top-right corner) 1.0.0

Please Note

The following APIs are not yet supported

Name Description
ft.onMenuButtonBoundingClientRectWeightChange Listens for layout position changes of the capsule button in the upper right corner
ft.offMenuButtonBoundingClientRectWeightChange Cancels listening for layout position changes of the capsule button in the upper right corner

# 5.12 Window

Name Description Version Notes
ft.onWindowResize Listens for window resize events 1.0.0
ft.offWindowResize Cancels listening for window resize events 1.0.0
ft.setWindowSize Supported on iOS and Android, sets the window size of the current Mini-Program, only effective for widget type Base Library 3.5.2, SDK 2.46.3 and above

Please Note

The following APIs are not yet supported

Name Description
ft.checkIsPictureInPictureActive Returns whether picture-in-picture playback is currently active

# 5.13 worklet Animation

Please Note

The following APIs are not yet supported

Name Description
ft.worklet Gets the worklet object

# 5.13.1 worklet

Please Note

The following APIs are not yet supported

Name Description
worklet.cancelAnimation Cancels an animation driven by SharedValue
worklet.derived DerivedValue, can generate other shared variables based on existing SharedValue
worklet.Easing Common animation easing functions
worklet.scrollViewContext ScrollView instance, can operate scroll-view component within worklet functions
worklet.scrollViewContext.scrollTo Scrolls to a specified position
worklet.shared Creates a shared variable SharedValue for cross-thread data sharing and animation driving
worklet.cancelAnimation Cancels an animation driven by SharedValue
worklet.derived DerivedValue, can generate other shared variables based on existing SharedValue
worklet.shared Shared variable SharedValue, for cross-thread data sharing and animation driving
worklet.decay Scroll-based animation
worklet.spring Physics-based animation
worklet.timing Time-based animation
worklet.delay Delays animation execution
worklet.repeat Repeats animation execution
worklet.sequence Combines animation sequences, executes passed animations sequentially
worklet.runOnJS When worklet functions run on the UI thread, captured external functions may be worklet type or regular functions. To distinguish them clearly, runOnJS must be used to call back regular functions on the JS thread
worklet.runOnUI Executes worklet functions on the UI thread

# 6. Network

# 6.1 Initiate Request

Name Description Version Notes
ft.request Initiates an HTTPS network request 1.0.0

# 6.2 RequestTask

Name Description Version Notes
RequestTask.abort Interrupts the request task 1.0.0
RequestTask.onHeadersReceived Listens for HTTP Response Header events 1.0.0
RequestTask.offHeadersReceived Cancels listening for HTTP Response Header events 1.0.0
RequestTask.onChunkReceived Listens for Chunk Received events 3.2.3
RequestTask.offChunkReceived Cancels listening for Chunk Received events 3.2.3

# 6.3 Download

Name Description Version Notes
ft.downloadFile Downloads a file resource to the local device 1.0.0

# 6.3.1 DownloadTask

Name Description Version Notes
DownloadTask.abort Interrupts the download task 1.0.0
DownloadTask.offHeadersReceived Removes the listener for HTTP Response Header events 1.0.0
DownloadTask.onHeadersReceived Listens for HTTP Response Header events. Occurs earlier than the request completion event 1.0.0
DownloadTask.offProgressUpdate Removes the listener for download progress change events 1.0.0
DownloadTask.onProgressUpdate Listens for download progress change events 1.0.0

# 6.4 Upload

Name Description Version Notes
ft.uploadFile Uploads a local resource to the server 1.0.0

# 6.4.1 UploadTask

Name Description Version Notes
UploadTask.abort Interrupts the upload task 1.0.0
UploadTask.offHeadersReceived Removes the listener for HTTP Response Header events 1.0.0
UploadTask.onHeadersReceived Listens for HTTP Response Header events. Occurs earlier than the request completion event 1.0.0
UploadTask.offProgressUpdate Removes the listener for upload progress change events 1.0.0
UploadTask.onProgressUpdate Listens for upload progress change events 1.0.0

# 6.5 WebSocket

Name Description Version Notes
ft.sendSocketMessage Sends data through a WebSocket connection 1.0.0
ft.onSocketOpen Listens for WebSocket connection open events 1.0.0
ft.onSocketMessage Listens for WebSocket message received from server events 1.0.0
ft.onSocketError Listens for WebSocket error events 1.0.0
ft.onSocketClose Listens for WebSocket connection close events 1.0.0
ft.connectSocket Creates a WebSocket connection 1.0.0
ft.closeSocket Closes a WebSocket connection 1.0.0

# 6.5.1 SocketTask

Name Description Version Notes
SocketTask.close Closes a WebSocket connection 1.0.0
SocketTask.onClose Listens for WebSocket connection close events 1.0.0
SocketTask.onError Listens for WebSocket error events 1.0.0
SocketTask.onMessage Listens for WebSocket message received from server events 1.0.0
SocketTask.onOpen Listens for WebSocket connection open events 1.0.0
SocketTask.send Sends data through a WebSocket connection 1.0.0

# 6.6 mDNS

Please Note

The following APIs are not yet supported

Name Description
ft.stopLocalServiceDiscovery Stops searching for mDNS services
ft.startLocalServiceDiscovery Starts searching for mDNS services on the local network
ft.onLocalServiceResolveFail Listens for mDNS service resolution failure events
ft.onLocalServiceLost Listens for mDNS service departure events
ft.onLocalServiceFound Listens for mDNS service discovery events
ft.onLocalServiceDiscoveryStop Listens for mDNS service search stop events
ft.offLocalServiceResolveFail Cancels listening for mDNS service resolution failure events
ft.offLocalServiceLost Cancels listening for mDNS service departure events
ft.offLocalServiceFound Cancels listening for mDNS service discovery events
ft.offLocalServiceDiscoveryStop Cancels listening for mDNS service search stop events

# 6.7 TCP Communication

Name Description Version Notes
ft.createTCPSocket Creates a TCP Socket instance 1.0.0

# 6.7.1 TCPSocket

Name Description Version Notes
TCPSocket.onMessage Listens for events triggered when data is received 1.0.0
TCPSocket.write Sends data on the socket 1.0.0
TCPSocket.close Closes the connection 1.0.0
TCPSocket.connect Initiates a connection on the given socket 1.0.0
TCPSocket.offConnect Removes the listener for events triggered when a socket connection is successfully established 1.0.0
TCPSocket.offClose Removes the listener for events triggered when a socket is completely closed 1.0.0
TCPSocket.offError Removes the listener for events triggered when an error occurs 1.0.0
TCPSocket.offMessage Removes the listener for events triggered when data is received 1.0.0
TCPSocket.onClose Listens for events triggered when a socket is completely closed 1.0.0
TCPSocket.onConnect Listens for events triggered when a socket connection is successfully established 1.0.0
TCPSocket.onError Listens for events triggered when an error occurs 1.0.0

Please Note

The following APIs are not yet supported

Name Description
TCPSocket.bindWifi Binds the TCP Socket to the current wifi network. The onBindWifi event will be triggered upon success (Android only)
TCPSocket.offBindWifi Removes the listener for events triggered when a socket is successfully bound to the current wifi network
TCPSocket.onBindWifi Listens for events triggered when a socket is successfully bound to the current wifi network

# 6.8 UDP Communication

Name Description Version Notes
ft.createUDPSocket Creates a UDP Socket instance 1.0.0

# 6.8.1 UDPSocket

Name Description Version Notes
UDPSocket.bind Binds to a system-assigned available port or a specified port number 1.0.0
UDPSocket.close Closes the UDP Socket instance, equivalent to destruction 1.0.0
UDPSocket.offClose Cancels listening for close events 1.0.0
UDPSocket.offError Cancels listening for error events 1.0.0
UDPSocket.offListening Cancels listening for events when starting to listen for datagram messages 1.0.0
UDPSocket.offMessage Cancels listening for message received events 1.0.0
UDPSocket.onClose Listens for close events 1.0.0
UDPSocket.onError Listens for error events 1.0.0
UDPSocket.onListening Listens for events when starting to listen for datagram messages 1.0.0
UDPSocket.onMessage Listens for message received events 1.0.0
UDPSocket.connect Pre-connects to a specified IP and port, must be used with the write method 1.0.0
UDPSocket.write Usage is the same as the send method. If connect is not called in advance, there is no difference from send (note that even if connect is called, the address and port parameters must still be provided in this interface) 1.0.0
UDPSocket.setTTL Sets the IP_TTL socket option, used to set the maximum number of hops allowed for an IP data packet during transmission 1.0.0
UDPSocket.send Sends a message to a specified IP and port 1.0.0

# 7. Payment

Name Description Version Notes
ft.requestPayment Initiates a payment 1.0.0

Please Note

The following APIs are not yet supported

Name Description
ft.requestVirtualPayment Initiates a virtual payment
ft.requestPluginPayment Initiates a payment within a plugin
ft.requestMerchantTransfer In merchant transfer user confirmation mode, initiates a page request within the Mini-Program on the client to ask the user to confirm receipt
ft.requestCommonPayment Initiates a general payment
ft.openHKOfflinePayView Launches the HK payment code view

# 8. Data Cache / Storage

Name Description Version Notes
ft.setStorageSync Synchronous version of ft.setStorage 1.0.0
ft.setStorage Stores data in the local cache under the specified key 1.0.0
ft.removeStorageSync Synchronous version of ft.removeStorage 1.0.0
ft.removeStorage Removes the specified key from the local cache 1.0.0
ft.getStorageSync Synchronous version of ft.getStorage 1.0.0
ft.getStorageInfoSync Synchronous version of ft.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 Synchronous version of ft.clearStorage 1.0.0
ft.clearStorage Clears local data cache 1.0.0
ft.batchSetStorageSync Batch stores data in the local cache under the specified keys 3.0.49
ft.batchSetStorage Batch stores data in the local cache under the specified keys 3.0.49
ft.batchGetStorageSync Synchronously batch gets the content of the specified keys from the local cache 3.0.49
ft.batchGetStorage Synchronously batch gets the content of the specified keys from the local cache 3.0.49

Please Note

The following APIs are not yet supported

Name Description
ft.revokeBufferURL Destroys data in memory based on the URL
ft.createBufferURL Creates a unique URL in memory based on the passed buffer

# 8.1 Periodic Update

Name Description Version Notes
ft.setBackgroundFetchToken Sets a custom login token, which is included when periodically fetching data, allowing the third-party server to verify the request's legitimacy Supported from Base Library 3.2.1
ft.onBackgroundFetchData Listens for callbacks when backgroundFetch data is received Supported from Base Library 3.2.1
ft.getBackgroundFetchToken Gets the custom login token that has been set Supported from Base Library 3.2.1
ft.getBackgroundFetchData Fetches backgroundFetch client cache data Supported from Base Library 3.2.1

# 8.2 Cache Manager

Name Description Version
ft.createCacheManager Creates a cache manager 3.2.2

# 8.2.1 CacheManager

Name Description Version
CacheManager.addRule Adds a rule 3.2.2
CacheManager.addRules Batch adds rules. Rule format can refer to CacheManager.addRule 3.2.2
CacheManager.clearCaches Clears all caches 3.2.2
CacheManager.clearRules Clears all rules, and also deletes all caches under the corresponding rules 3.2.2
CacheManager.deleteCache Deletes a cache 3.2.2
CacheManager.deleteCaches Batch deletes caches 3.2.2
CacheManager.deleteRule Deletes a rule, and also deletes all caches under the corresponding rule 3.2.2
CacheManager.deleteRules Deletes rules, and also deletes all caches under the corresponding rules 3.2.2
CacheManager.match Matches the hit cache rule, generally used in conjunction with the request event 3.2.2
CacheManager.off Cancels event listening 3.2.2
CacheManager.on Listens for events 3.2.2
CacheManager.start Starts the cache. Only effective when mode is 'none'. After calling, the cache manager's state will be set to 1 3.2.2
CacheManager.stop Stops the cache. Only effective when mode is 'none'. After calling, the cache manager's state will be set to 0 3.2.2

# 9. Data Analysis

Please Note

The following APIs are not yet supported

Name Description
ft.reportMonitor Custom business data monitoring report interface
ft.reportEvent Event reporting
ft.reportAnalytics Custom analytics data report interface
ft.getExptInfoSync Given an array of experiment parameters, gets the corresponding experiment parameter values
ft.getCommonConfig Given an array of experiment parameters, gets the corresponding experiment parameter values

# 10. Canvas

Name Description Version Notes
ft.createOffscreenCanvas Creates an offscreen canvas instance 3.0.0 API functionality is not fully supported. It is recommended to use a regular canvas instead
ft.createCanvasContext Creates a CanvasContext object for the canvas drawing context 1.0.0
ft.canvasToTempFilePath Exports the content of the specified area of the current canvas to generate an image of a specified size 1.0.0 Does not support offscreen canvas
ft.canvasPutImageData Draws pixel data onto the canvas 1.0.0
ft.canvasGetImageData Gets the implicit pixel data of the canvas area 1.0.0

# 10.1 Canvas

Name Description Version Notes
Canvas.createImage Creates an image object. Only the canvas obtained via createSelectorQuery has this method 1.0.0
Canvas.getContext Returns the drawing context of the Canvas 1.0.0
Canvas.createImageData Creates an ImageData object 1.0.0 This API depends on the underlying synchronization mechanism and is currently only supported on iOS. To get image data, use ft.canvasGetImageData instead
Canvas.toDataURL Returns a data URI containing the image display 3.0.0 This API depends on the underlying synchronization mechanism and is currently only supported on iOS. To get image data, use canvasToTempFilePath instead
Canvas.requestAnimationFrame Executes on the next repaint 3.0.0
Canvas.cancalAnimationFrame Cancels an animation frame request scheduled by requestAnimationFrame 3.0.0

Please Note

The following APIs are not yet supported

Name Description
Canvas.createPath2D Creates a Path2D object

# 10.2 CanvasContext

Name Description Version Notes
CanvasContext.arc Creates an arc 1.0.0
CanvasContext.arcTo Draws an arc path based on control points and radius 1.0.0
CanvasContext.beginPath Starts creating a path 1.0.0
CanvasContext.bezierCurveTo Creates a cubic Bézier curve path 1.0.0
CanvasContext.clearRect Clears the content within the specified rectangular area on the canvas 1.0.0
CanvasContext.createCircularGradient Creates a circular gradient color 1.0.0
CanvasContext.createLinearGradient Creates a linear gradient color 1.0.0
CanvasContext.createPattern Creates a pattern for the specified image, repeating the source image in the specified direction 1.0.0
CanvasContext.clip Clips any shape and size from the original canvas 1.0.0
CanvasContext.closePath Closes a path 1.0.0
CanvasContext.drawImage Draws an image onto the canvas 1.0.0
CanvasContext.draw Draws the previously described content (paths, transformations, styles) in the drawing context onto the canvas 1.0.0
CanvasContext.fill Fills the content within the current path 1.0.0
CanvasContext.fillRect Fills a rectangle 1.0.0
CanvasContext.fillText Draws filled text on the canvas 1.0.0
CanvasContext.lineTo Adds a new point and creates a line from the last specified point to the target point 1.0.0
CanvasContext.measureText Measures text size information 1.0.0
CanvasContext.moveTo Moves the path to a specified point on the canvas without creating a line 1.0.0
CanvasContext.quadraticCurveTo Creates a quadratic Bézier curve path 1.0.0
CanvasContext.rotate Rotates the current coordinate axes clockwise around the origin 1.0.0
CanvasContext.restore Restores the previously saved drawing context 1.0.0
CanvasContext.rect Creates a rectangular path 1.0.0
CanvasContext.save Saves the drawing context 1.0.0
CanvasContext.scale Scales the horizontal and vertical coordinates of subsequently created paths 1.0.0
CanvasContext.setLineDash Sets the dashed line style 1.0.0
CanvasContext.setLineCap Sets the endpoint style of lines 1.0.0
CanvasContext.setGlobalAlpha Sets the global brush transparency 1.0.0
CanvasContext.setFontSize Sets the font size 1.0.0
CanvasContext.setFillStyle Sets the fill color 1.0.0
CanvasContext.setStrokeStyle Sets the stroke color 1.0.0
CanvasContext.setShadow Sets the shadow style 1.0.0
CanvasContext.setMiterLimit Sets the maximum miter length 1.0.0
CanvasContext.setLineWidth Sets the line width 1.0.0
CanvasContext.setLineJoin Sets the intersection style of lines 1.0.0
CanvasContext.setTransform Resets (overwrites) the current transformation using a matrix 1.0.0
CanvasContext.setTextBaseline Sets the vertical alignment of text 1.0.0
CanvasContext.setTextAlign Sets the text alignment 1.0.0
CanvasContext.strokeRect Draws a rectangle (unfilled) 1.0.0
CanvasContext.strokeText Draws text stroke at the given (x, y) position 1.0.0
CanvasContext.stroke Draws the border of the current path 1.0.0
CanvasContext.transform Applies multiple transformations using a matrix 1.0.0
CanvasContext.translate Transforms the origin (0, 0) of the current coordinate system 1.0.0

# 10.3 CanvasGradient

Name Description
CanvasGradient.addColorStop Adds a color gradient stop
Color Color
Image Image
ImageData ImageData object

# 10.4 OffscreenCanvas

Name Description Version Notes
OffscreenCanvas.createImage Creates an image object 1.0.0
OffscreenCanvas.getContext Returns the drawing context of the OffscreenCanvas 1.0.0

# 11. Media

# 11.1 Map

Name Description Version Notes
ft.createMapContext Creates a map context MapContext object 1.0.0

# 11.1.1 MapContext

Name Description Version Notes
MapContext.addArc Adds an arc; either waypoints or angle must be set Not supported
MapContext.addCustomLayer Adds a custom layer Not supported
MapContext.addGroundOverlay Creates a custom image overlay that scales with the map Not supported
MapContext.addVisualLayer Adds a visual layer Not supported
MapContext.addMarkers Adds markers 1.0.0
MapContext.fromScreenLocation Gets the latitude and longitude of a point on the screen, with the origin at the top-left corner of the map 1.0.0
MapContext.getCenterLocation Gets the latitude and longitude of the current map center 1.0.0
MapContext.getRegion Gets the current visible region of the map 1.0.0
MapContext.getRotate Gets the current rotation angle of the map 1.0.0
MapContext.getSkew Gets the current tilt angle of the map 1.0.0
MapContext.getScale Gets the current zoom level of the map 1.0.0
MapContext.includePoints Zooms the view to display all specified coordinates 1.0.0
MapContext.initMarkerCluster Initializes marker cluster configuration; uses default configuration if not called 1.0.0
MapContext.moveAlong Moves a marker along a specified path, used for scenarios like track replay 1.0.0
MapContext.moveToLocation Centers the map on the current location; requires the map component's show-location attribute to be true 1.0.0
MapContext.openMapApp Launches a map app for navigation 1.0.0
MapContext.removeCustomLayer Removes a custom layer Not supported
MapContext.removeGroundOverlay Removes a custom image overlay Not supported
MapContext.removeMarkers Removes markers 1.0.0
MapContext.removeVisualLayer Removes a visual layer Not supported
MapContext.setBoundary Restricts the display range of the map Not supported
MapContext.setCenterOffset Sets the offset of the map center; increases downward and rightward, screen ratio range (0.25~0.75), default offset is [0.5, 0.5] 1.0.0
MapContext.setLocMarkerIcon Sets the location marker icon, supports network paths, local paths, and code package paths 1.0.0
MapContext.toScreenLocation Gets the screen coordinates corresponding to a latitude and longitude, with the origin at the top-left corner of the map 1.0.0
MapContext.translateMarker Translates a marker with animation 1.0.0
MapContext.updateGroundOverlay Updates a custom image overlay Not supported
MapContext.on Listens to map events 1.0.0

Note

The following APIs are not yet supported

Name Description
MapContext.addVisualLayer Adds a visual layer
MapContext.removeVisualLayer Removes a visual layer
MapContext.removeArc Deletes an arc
MapContext.eraseLines Erases or grays out lines already added to the map
MapContext.executeVisualLayerCommand Executes visual layer commands, used in conjunction with MapContext.on('visualLayerEvent') event listening

# 11.2 Image

Name Description Version Notes
ft.saveImageToPhotosAlbum Saves an image to the system album 1.0.0
ft.previewMedia Previews images and videos 1.0.0
ft.previewImage Previews an image in full screen on a new page 1.0.0
ft.getImageInfo Gets image information 1.0.0
ft.compressImage Compresses an image with optional quality setting 1.0.0
ft.chooseFile Selects a file from the file picker 3.0.35
ft.chooseMessageFile Selects a file from the client session 2.0.32 Requires custom injection by the app
ft.chooseImage Selects an image from the local album or takes a photo with the camera 1.0.0
ft.cropImage Edits an image 3.3.3
ft.editImage Crops an image 3.3.3

Note

The following APIs are not yet supported

Name Description
ft.chooseMessageFile Selects a file from the client session

# 11.3 Video

Name Description Version Notes
ft.saveVideoToPhotosAlbum Saves a video to the system album 1.0.0
ft.createVideoContext Creates a video context VideoContext object 1.0.0
ft.compressVideo Compresses a video 1.0.0
ft.chooseVideo Records a video or selects one from the phone album 1.0.0
ft.chooseMedia Records or selects images or videos from the phone album 1.0.0
ft.previewVideo Previews a video 1.0.0
ft.getVideoInfo Gets detailed video information 3.1.17

Note

The following APIs are not yet supported

Name Description
ft.openVideoEditor Opens the video editor
ft.checkDeviceSupportHevc Checks if the device supports H.265 encoding

# 11.3.1 videoContext

Name Description Version Notes
videoContext.exitBackgroundPlayback Exits background audio playback mode 1.0.0
videoContext.exitFullScreen Exits full screen 1.0.0
videoContext.exitPictureInPicture Exits picture-in-picture mode; can be called from any page 1.0.0
videoContext.hideStatusBar Hides the status bar; only effective in full screen on iOS 1.0.0
videoContext.pause Pauses the video 1.0.0
videoContext.play Plays the video 1.0.0
videoContext.playbackRate Sets the playback speed 1.0.0
videoContext.requestBackgroundPlayback Enters background audio playback mode 1.0.0
videoContext.requestFullScreen Enters full screen 1.0.0
videoContext.seek Jumps to a specified position 1.0.0
videoContext.sendDanmu Sends a danmaku (comment) 1.0.0
videoContext.showStatusBar Shows the status bar; only effective in full screen on iOS 1.0.0
videoContext.stop Stops the video 1.0.0
videoContext.takeSnapshot Takes a video snapshot 3.11.3

Note

The following APIs are not yet supported

Name Description
VideoContext.exitCasting Exits screen casting
VideoContext.reconnectCasting Reconnects to a casting device
VideoContext.startCasting Starts screen casting, opens a half-screen device search
VideoContext.switchCasting Switches casting devices

# 11.4 Audio

Name Description Version Notes
ft.stopVoice Stops playing voice 1.0.0
ft.setInnerAudioOption Sets playback options for InnerAudioContext 1.0.0
ft.playVoice Starts playing voice 1.0.0
ft.pauseVoice Pauses the currently playing voice 1.0.0
ft.createInnerAudioContext Creates an inner audio context InnerAudioContext object 1.0.0
ft.createAudioContext Creates an audio context AudioContext object 1.0.0
ft.getAvailableAudioSources Gets the currently supported audio input sources 3.1.7 The value obtained in the development tool is fixed to auto

Note

The following APIs are not yet supported

Name Description
ft.createWebAudioContext Creates a WebAudio context
ft.createMediaAudioPlayer Creates a MediaAudioPlayer object for playing audio output from a video decoder (VideoDecoder)

# 11.4.1 AudioBuffer

Note

The following APIs are not yet supported

Name Description
AudioBuffer.copyFromChannel Copies from a specified channel of the AudioBuffer to an array
AudioBuffer.copyToChannel Copies samples from a specified array to a specific channel of the AudioBuffer
AudioBuffer.getChannelData Returns a Float32Array containing PCM data for the channel defined by the channel parameter (0 represents the first channel)

# 11.4.2 audiocontext

Name Description Version Notes
audiocontext.setSrc Sets the audio source URL 1.0.0
audiocontext.play Plays the audio 1.0.0
audiocontext.pause Pauses the audio 1.0.0
audiocontext.seek Jumps to a specified position 1.0.0

# 11.4.3 InnerAudioContext

Name Description Version Notes
InnerAudioContext.destroy Destroys the current instance 1.0.0
InnerAudioContext.offCanplay Cancels listening for the event when audio is ready to play 1.0.0
InnerAudioContext.offEnded Cancels listening for the event when audio naturally finishes playing 1.0.0
InnerAudioContext.offError Cancels listening for audio playback error events 1.0.0
InnerAudioContext.offTimeUpdate Cancels listening for audio playback progress update events 1.0.0
InnerAudioContext.offSeeking Cancels listening for audio seek events 1.0.0
InnerAudioContext.offWaiting Cancels listening for audio loading events 1.0.0
InnerAudioContext.onEnded Listens for the event when audio naturally finishes playing 1.0.0
InnerAudioContext.offPlay Cancels listening for audio playback events 1.0.0
InnerAudioContext.onCanplay Listens for the event when audio is ready to play 1.0.0
InnerAudioContext.onPause Listens for audio pause events 1.0.0
InnerAudioContext.offPause Cancels listening for audio pause events 1.0.0
InnerAudioContext.offSeeked Cancels listening for the event when audio completes a seek operation 1.0.0
InnerAudioContext.offStop Cancels listening for audio stop events 1.0.0
InnerAudioContext.onError Listens for audio playback error events 1.0.0
InnerAudioContext.onPlay Listens for audio playback events 1.0.0
InnerAudioContext.onSeeked Listens for the event when audio completes a seek operation 1.0.0
InnerAudioContext.onSeeking Listens for audio seek events 1.0.0
InnerAudioContext.onStop Listens for audio stop events 1.0.0
InnerAudioContext.onTimeUpdate Listens for audio playback progress update events 1.0.0
InnerAudioContext.onWaiting Listens for audio loading events 1.0.0
InnerAudioContext.pause Pauses 1.0.0
InnerAudioContext.play Plays 1.0.0
InnerAudioContext.seek Jumps to a specified position 1.0.0
InnerAudioContext.stop Stops 1.0.0

# 11.4.4 MediaAudioPlayer

Please Note

The following APIs are not yet supported

Name Description
MediaAudioPlayer.addAudioSource Add audio source
MediaAudioPlayer.destroy Destroy the player
MediaAudioPlayer.removeAudioSource Remove audio source
MediaAudioPlayer.start Start the player
MediaAudioPlayer.stop Stop the player

# 11.4.5 WebAudioContext

Please Note

The following APIs are not yet supported

Name Description
WebAudioContext.close Close the WebAudioContext
WebAudioContext.createAnalyser Create an AnalyserNode
WebAudioContext.createBiquadFilter Create a BiquadFilterNode
WebAudioContext.createBuffer Create an AudioBuffer, representing a short audio clip residing in memory
WebAudioContext.createBufferSource Create a BufferSourceNode instance to play audio data via an AudioBuffer object
WebAudioContext.createChannelMerger Create a ChannelMergerNode
WebAudioContext.createChannelSplitter Create a ChannelSplitterNode
WebAudioContext.createConstantSource Create a ConstantSourceNode
WebAudioContext.createDelay Create a DelayNode
WebAudioContext.createDynamicsCompressor Create a DynamicsCompressorNode
WebAudioContext.createGain Create a GainNode
WebAudioContext.createIIRFilter Create an IIRFilterNode
WebAudioContext.createOscillator Create an OscillatorNode
WebAudioContext.createPanner Create a PannerNode
WebAudioContext.createPeriodicWave Create a PeriodicWaveNode
WebAudioContext.createScriptProcessor Create a ScriptProcessorNode
WebAudioContext.createWaveShaper Create a WaveShaperNode
WebAudioContext.decodeAudioData Asynchronously decode a resource into an AudioBuffer
WebAudioContext.resume Synchronously resume a paused WebAudioContext
WebAudioContext.suspend Synchronously suspend the WebAudioContext
WebAudioContextNode A type of audio processing module; different Nodes have different functions, such as GainNode (volume adjustment)

# 11.5 Background Audio

Name Description Version Notes
ft.stopBackgroundAudio Stop playing music 1.0.0
ft.seekBackgroundAudio Control music playback progress 1.0.0
ft.playBackgroundAudio Play music using the background player 1.0.0
ft.pauseBackgroundAudio Pause music playback 1.0.0
ft.onBackgroundAudioStop Listen for the music stop event 1.0.0
ft.onBackgroundAudioPlay Listen for the music play event 1.0.0
ft.onBackgroundAudioPause Listen for the music pause event 1.0.0
ft.getBackgroundAudioPlayerState Get the background music playback state 1.0.0
ft.getBackgroundAudioManager Get the globally unique background audio manager. When the Mini-Program enters the background, if audio is playing, it can continue. However, the background state cannot control the audio playback state via API calls. 2.12.12

# 11.5.1 BackgroundAudioManager

Name Description Version Notes
backgroundaudiomanager.onCanplay Listen for the event when background audio enters the playable state 1.0.0
backgroundaudiomanager.onEnded Listen for the event when background audio naturally finishes playing 1.0.0
BackgroundAudioManager.onError Listen for background audio playback error events 1.0.0
backgroundaudiomanager.onNext Listen for the user clicking the next track button on the system music playback panel (iOS only) 1.0.0
backgroundaudiomanager.onPause Listen for background audio pause events 1.0.0
backgroundaudiomanager.onPlay Listen for background audio play events 1.0.0
backgroundaudiomanager.onPrev Listen for the user clicking the previous track button on the system music playback panel (iOS only) 1.0.0
backgroundaudiomanager.onSeeked Listen for the event when background audio completes a seek operation 1.0.0
backgroundaudiomanager.onSeeking Listen for the event when background audio starts a seek operation 1.0.0
backgroundaudiomanager.onStop Listen for background audio stop events 1.0.0
backgroundaudiomanager.onTimeUpdate Listen for background audio playback progress update events; only triggers when the Mini-Program is in the foreground 1.0.0
backgroundaudiomanager.onWaiting Listen for audio loading events 1.0.0
backgroundaudiomanager.pause Pause music 1.0.0
backgroundaudiomanager.play Play music 1.0.0
backgroundaudiomanager.seek Seek to a specified position 1.0.0
backgroundaudiomanager.stop Stop music 1.0.0

# 11.6 Real-Time Audio and Video

Name Description Version Notes
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.1 LivePlayerContext

Name Description Version Notes
LivePlayerContext.exitPictureInPicture Exit picture-in-picture mode; this method can be called from any page 1.0.0
LivePlayerContext.mute Mute 1.0.0
LivePlayerContext.pause Pause 1.0.0
LivePlayerContext.play Play 1.0.0
LivePlayerContext.resume Resume 1.0.0
LivePlayerContext.stop Stop 1.0.0

Please Note

The following APIs are not yet supported

Name Description
LivePlayerContext.exitFullScreen Exit background audio playback mode
LivePlayerContext.requestFullScreen Enter full screen
LivePlayerContext.snapshot Take a screenshot
LivePlayerContext.requestPictureInPicture Enter picture-in-picture mode
LivePlayerContext.exitCasting Exit screen casting
LivePlayerContext.reconnectCasting Reconnect to the casting device
LivePlayerContext.startCasting Start screen casting, pull up half-screen to search for devices
LivePlayerContext.switchCasting Switch casting device
LivePlayerContext.requestBackgroundPlayback Enter background audio playback mode
LivePlayerContext.exitBackgroundPlayback Exit background audio playback mode

# 11.6.2 LivePusherContext

Name Description Version Notes
LivePusherContext.exitPictureInPicture Exit picture-in-picture mode; this method can be called from any page 1.0.0
LivePusherContext.pause Pause streaming 1.0.0
LivePusherContext.resume Resume streaming 1.0.0
LivePusherContext.start Start streaming and enable camera preview 1.0.0
LivePusherContext.startPreview Enable camera preview 1.0.0
LivePusherContext.stop Stop streaming and disable camera preview 1.0.0
LivePusherContext.stopPreview Disable camera preview 1.0.0
LivePusherContext.switchCamera Switch between front and rear cameras 1.0.0

Please Note

The following APIs are not yet supported

Name Description
LivePusherContext.pauseBGM Pause background music
LivePusherContext.playBGM Play background music
LivePusherContext.resumeBGM Resume background music
LivePusherContext.sendMessage Send SEI message
LivePusherContext.setBGMVolume Set background music volume
LivePusherContext.setMICVolume Set microphone volume
LivePusherContext.snapshot Take a snapshot
LivePusherContext.toggleTorch Toggle flashlight
LivePusherContext.stopBGM Stop background music
LivePusherContext.applyBlusherStickMakeup Apply blush makeup effect
LivePusherContext.applyEyeBrowMakeup Apply eyebrow makeup effect
LivePusherContext.applyEyeShadowMakeup Apply eye shadow makeup effect
LivePusherContext.applyFaceContourMakeup Apply contour makeup effect
LivePusherContext.applyFilter Apply filter effect
LivePusherContext.applyLipStickMakeup Apply lipstick makeup effect
LivePusherContext.applySticker Apply sticker effect
LivePusherContext.clearFilters Clear all filter effects
LivePusherContext.clearMakeups Clear all makeup effects
LivePusherContext.clearStickers Clear all sticker effects
LivePusherContext.createOffscreenCanvas Create an offscreen Canvas that can receive LivePusher captured textures
LivePusherContext.getMaxZoom Get the maximum zoom level
LivePusherContext.onCustomRendererEvent When custom rendering is enabled, developers subscribe to related events via this method
LivePusherContext.setZoom Set the zoom level

# 11.7 Recording

Name Description Version Notes
ft.stopRecord Stop recording 1.0.0
ft.startRecord Start recording 1.0.0
ft.getRecorderManager Get the globally unique recording manager RecorderManager 1.0.0

# 11.7.1 RecorderManager

Name Description Version Notes
RecorderManager.onError Listen for recording error events 1.0.0
RecorderManager.onFrameRecorded Listen for the event when a file of the specified frame size has been recorded 1.0.0
RecorderManager.onInterruptionBegin Listen for the event when recording is interrupted due to system occupation 1.0.0
RecorderManager.onInterruptionEnd Listen for the event when recording interruption ends 1.0.0
RecorderManager.onPause Listen for recording pause events 1.0.0
RecorderManager.onResume Listen for recording resume events 1.0.0
RecorderManager.onStop Listen for recording end events 1.0.0
RecorderManager.pause Pause recording 1.0.0
RecorderManager.resume Resume recording 1.0.0
RecorderManager.onStart Listen for recording start events 1.0.0
RecorderManager.stop Stop recording 1.0.0
RecorderManager.start Start recording 1.0.0

# 11.8 Camera

Name Description Version Notes
ft.createCameraContext Create a camera context CameraContext object 1.0.0

# 11.8.1 CameraContext

Name Description Version Notes
CameraContext.onCameraFrame Get Camera real-time frame data 1.0.0
CameraContext.setZoom Set the zoom level 1.0.0
CameraContext.startRecord Start recording 1.0.0
CameraContext.stopRecord Stop recording 1.0.0
CameraContext.takePhoto Take a photo 1.0.0

# 11.8.2 CameraFrameListener

Name Description Version Notes
CameraFrameListener.start Start listening for frame data 1.0.0
CameraFrameListener.stop Stop listening for frame data 1.0.0

# 11.9 Rich Text

# 11.9.1 EditorContext

Name Description Version Notes
EditorContext.focus Focus the editor; due to system limitations on iOS, the focus method cannot be used normally, please note 3.9.4
EditorContext.blur Blur the editor and dismiss the keyboard 1.0.0
EditorContext.clear Clear the editor content 1.0.0
EditorContext.format Modify styles 1.0.0
EditorContext.getContents Get the editor content 1.0.0
EditorContext.getSelectionText Get the plain text content within the selected area of the editor 1.0.0
EditorContext.insertDivider Insert a divider 1.0.0
EditorContext.insertImage Insert an image 1.0.0
EditorContext.insertText Override the current selection and set a piece of text 1.0.0
EditorContext.redo Redo 1.0.0
EditorContext.removeFormat Clear the styles of the current selection 1.0.0
EditorContext.scrollIntoView Scroll the cursor position in the editor into the visible area of the window 1.0.0
EditorContext.setContents Initialize the editor content; when both html and delta exist, only delta takes effect 1.0.0
EditorContext.undo Undo 1.0.0
EditorContext.insertCustomBlock Insert a custom block 3.10.1

# 11.10 Audio and Video Composition

Please Note

The following APIs are not yet supported

Name Description
ft.createMediaContainer Create an audio and video processing container, which can eventually compose the tracks in the container into a video

# 11.10.1 MediaContainer

Please Note

The following APIs are not yet supported

Name Description
MediaContainer.addTrack Add an audio or video track to the container
MediaContainer.destroy Destroy the container and release resources
MediaContainer.export Merge the tracks in the container and export a video file
MediaContainer.extractDataSource Separate tracks from the input video source
MediaContainer.removeTrack Remove an audio or video track from the container
MediaTrack Can be returned via MediaContainer.extractDataSource

# 11.11 Real-Time Voice

Please Note

The following APIs are not yet supported

Name Description
ft.updateVoIPChatMuteConfig Update real-time voice chat mute settings
ft.subscribeVoIPVideoMembers Subscribe to video feed members
ft.setEnable1v1Chat Enable one-on-one chat
ft.onVoIPVideoMembersChanged Listen for video status changes of real-time voice chat members
ft.onVoIPChatStateChanged Listen for room status change events
ft.onVoIPChatSpeakersChanged Listen for call status changes of real-time voice chat members
ft.onVoIPChatMembersChanged Listen for online status changes of real-time voice chat members
ft.offVoIPChatSpeakersChanged Remove the listener function for call status changes of real-time voice chat members
ft.onVoIPChatInterrupted Listen for passive disconnection of real-time voice chat events
ft.offVoIPVideoMembersChanged Cancel listening for video status changes of real-time voice chat members
ft.offVoIPChatStateChanged Cancel listening for room status change events
ft.offVoIPChatMembersChanged Cancel listening for online status changes of real-time voice chat members
ft.offVoIPChatInterrupted Cancel listening for passive disconnection of real-time voice chat events
ft.joinVoIPChat Join (create) a real-time voice chat. For more information, see the Real-Time Voice Guide
ft.exitVoIPChat Exit (destroy) a real-time voice chat
ft.join1v1Chat Join (create) a one-on-one chat

# 11.12 Screen Recorder

Please Note

The following APIs are not yet supported

Name Description Version Remarks
ft.createMediaRecorder Create a WebGL screen recorder that can record frames rendered on WebGL frame by frame and export a video file

# 11.12.1 MediaRecorder

Please Note

The following APIs are not yet supported

Name Description
MediaRecorder.pause Pause recording
MediaRecorder.resume Resume recording
MediaRecorder.start Start recording
MediaRecorder.stop Stop recording
MediaRecorder.off Cancel listening for recording events
MediaRecorder.on Register a callback function to listen for recording events
MediaRecorder.requestFrame Request the next frame for recording. After completing one frame rendering in the callback, start recording the current frame

# 11.13 Video Decoder

Please Note

The following APIs are not yet supported

Name Description
ft.createVideoDecoder Create a video decoder that can obtain decoded data frame by frame

# 11.13.1 VideoDecoder

Please Note

The following APIs are not yet supported

Name Description
VideoDecoder.getFrameData Get the decoded data of the next frame
VideoDecoder.off Cancel listening for recording events
VideoDecoder.on Register a callback function to listen for recording events
VideoDecoder.remove Remove the decoder
VideoDecoder.seek Seek to a specific time point for decoding
VideoDecoder.start Start decoding
VideoDecoder.stop Stop decoding

# 12. Location

Name Description Version Remarks
ft.openLocation View location using the built-in map 1.0.0
ft.startLocationUpdate Start receiving location messages when the Mini-Program enters the foreground 1.0.0
ft.getLocation Get the current geographic location and speed 1.0.0
ft.choosePoi Open the POI list to select a location, supporting a mix of fuzzy positioning (accurate to city) and precise positioning 2.12.1
ft.chooseLocation Open the map to select a location 1.0.0
ft.stopLocationUpdate Stop listening for real-time location changes, stopping message reception in both foreground and background 3.0.18
ft.startLocationUpdateBackground Start receiving location messages when the Mini-Program enters both foreground and background. User authorization must be guided 3.0.18
ft.onLocationChange Listen for real-time geographic location change events. Must be used in conjunction with ft.startLocationUpdateBackground, wx.startLocationUpdate 3.0.18
ft.offLocationChange Cancel listening for real-time geographic location change events 3.0.18
ft.onLocationChangeError Triggered when the continuous positioning interface returns a failure 3.0.18
ft.offLocationChangeError Remove the trigger when the continuous positioning interface returns a failure 3.0.18

Please Note

The following APIs are not yet supported

Name Description
getFuzzyLocation Get the current fuzzy geographic location

# 13. File

Name Description Version Remarks
ft.saveFile Save a file to the local device 1.0.0
ft.removeSavedFile Delete a local cache file 1.0.0
ft.openDocument Open a document in a new page 1.0.0
ft.getSavedFileList Get the list of locally cached files saved under this Mini-Program 1.0.0
ft.getSavedFileInfo Get file information for a local file 1.0.0
ft.getFileSystemManager Get the globally unique file manager 1.0.0
ft.getFileInfo Get file information 1.0.0
ft.saveFileToDisk Save a file from the file system to the user's disk. Only supported on PC 1.0.0
ft.openBrowser Open 3.11.3

# 13.1 FileSystemManager

Name Description Version Remarks
FileSystemManager.accessSync Check if a file/directory exists 1.0.0
FileSystemManager.access Check if a file/directory exists 1.0.0
FileSystemManager.appendFile Append content to the end of a file 1.0.0
FileSystemManager.appendFileSync Synchronous version of FileSystemManager.appendFile 1.0.0
FileSystemManager.close Close a file 1.0.0
FileSystemManager.closeSync Synchronously close a file 1.0.0
FileSystemManager.copyFile Copy a file 1.0.0
FileSystemManager.copyFileSync Synchronous version of FileSystemManager.copyFile 1.0.0
FileSystemManager.getFileInfo Get information about a local temporary file or local cache file under this Mini-Program 1.0.0
FileSystemManager.getSavedFileList Get the list of locally cached files saved under this Mini-Program 1.0.0
FileSystemManager.mkdir Create a directory 1.0.0
FileSystemManager.mkdirSync Synchronous version of FileSystemManager.mkdir 1.0.0
FileSystemManager.readdir Read the list of files in a directory 1.0.0
FileSystemManager.readdirSync Synchronous version of FileSystemManager.readdir 1.0.0
FileSystemManager.readFile Read the content of a local file 1.0.0
FileSystemManager.readFileSync Synchronous version of FileSystemManager.readFile 1.0.0
FileSystemManager.removeSavedFile Delete a locally cached file saved under this Mini-Program 1.0.0
FileSystemManager.rename Rename a file 1.0.0
FileSystemManager.renameSync Synchronous version of FileSystemManager.rename 1.0.0
FileSystemManager.rmdir Delete a directory 1.0.0
FileSystemManager.rmdirSync Synchronous version of FileSystemManager.rmdir 1.0.0
FileSystemManager.saveFile Save a temporary file to the local device 1.0.0
FileSystemManager.saveFileSync Synchronous version of FileSystemManager.saveFile 1.0.0
FileSystemManager.stat Get the file Stats object 1.0.0
FileSystemManager.statSync Synchronous version of FileSystemManager.stat 1.0.0
FileSystemManager.unlink Delete a file 1.0.0
FileSystemManager.unlinkSync Synchronous version of FileSystemManager.unlink 1.0.0
FileSystemManager.unzip Unzip a file 1.0.0
FileSystemManager.writeFile Write to a file 1.0.0
FileSystemManager.writeFileSync Synchronous version of FileSystemManager.writeFile 1.0.0
FileSystemManager.write Write to a file 1.0.0
FileSystemManager.writeSync Synchronous version of FileSystemManager.write 1.0.0
FileSystemManager.fstat Get the status information of a file 1.0.0
FileSystemManager.fstatSync Synchronously get the status information of a file 1.0.0
FileSystemManager.ftruncate Truncate the content of a file 1.0.0
FileSystemManager.ftruncateSync Truncate the content of a file 1.0.0
FileSystemManager.open Open a file and return a file descriptor 1.0.0
FileSystemManager.openSync Synchronously open a file and return a file descriptor 1.0.0
FileSystemManager.read Read a file 1.0.0
FileSystemManager.readSync Read a file 1.0.0
FileSystemManager.readZipEntry Read files within a compressed archive 1.0.0
FileSystemManager.truncate Truncate the content of a file 1.0.0
FileSystemManager.truncateSync Truncate the content of a file (synchronous version of truncate) 1.0.0
FileSystemManager.readCompressedFile Synchronously read the content of a local file of a specified compression type 3.3.7 Supported from SDK 2.45.1 onwards, requires adding the Extension SDK
FileSystemManager.readCompressedFileSync Synchronously read the content of a local file of a specified compression type 3.3.7 Supported from SDK 2.45.1 onwards, requires adding the Extension SDK. Synchronous mode is only supported on Android

# 13.2 Stats

Name Description Version Remarks
Stats.isDirectory Check if the current file is a directory 1.0.0
Stats.isFile Check if the current file is a regular file 1.0.0
WriteResult File write result 1.0.0

# 14. Open Interface

# 14.1 Login

Please Note

  • The following APIs require integrating the Extension SDK or require the App to implement the corresponding delegate methods.
  • You can click here to learn how to reuse WeChat login capabilities in Mini-Programs.
Name Description Version Remarks
ft.login Call the interface to obtain the login credential (code) 1.0.0
ft.checkSession Check if the login session has expired 1.0.0

Please Note

The following APIs are not yet supported

Name Description
ft.pluginLogin This interface can only be called within a Mini-Program plugin. Call the interface to obtain the plugin user identification credential (code)

# 14.2 Account Information

Name Description Version Remarks
ft.getAccountInfoSync Get the current account information 1.0.0

# 14.3 User Information

Please Note

  • The following APIs require integrating the Extension SDK or require the App to implement the corresponding delegate methods.
  • You can click here to learn how to reuse WeChat login capabilities in Mini-Programs.
  • You can click here to learn how to implement the iOS delegate method for getUserInfo
  • You can click here to learn how to implement the Android interface method for getUserInfo
Name Description Version Remarks
ft.getUserProfile Get user information 1.0.0 Note: Using this API requires integrating the WeChat Extension SDK
ft.getUserInfo Get user information 1.0.0 Note: Using this API requires the App to implement the delegate method
UserInfo User information 1.0.0

# 14.4 Authorization

Name Description Version Remarks
ft.authorize Initiate an authorization request to the user in advance 1.0.0

Please Note

The following APIs are not yet supported

Name Description
ft.authorizeForMiniProgram This interface can only be called within a Mini-Program plugin. Usage is the same as ft.authorize

# 14.5 Settings

Name Description Version Remarks
ft.openSetting Open the client Mini-Program settings interface and return the user's operation result 1.0.0
ft.getSetting Get the user's current settings 1.0.0
AuthSetting User authorization settings information. For details, refer to Permissions 1.0.0

Please Note

The following APIs are not yet supported

Name Description
SubscriptionsSetting Subscription message settings

# 14.6 Shipping Address

Please Note

The following APIs are not yet supported

Name Description
ft.chooseAddress Get the user's shipping address

# 14.7 Cards and Coupons

Please Note

The following APIs are not yet supported

Name Description
ft.openCard View coupons in WeChat card wallet
ft.addCard Batch add coupons

# 14.8 Invoice

Please Note

The following APIs are not yet supported

Name Description
ft.chooseInvoiceTitle Select the user's invoice title
ft.chooseInvoice Select an existing invoice from the user

# 14.9 Biometric Authentication

Please Note

The following APIs are not yet supported

Name Description
ft.startSoterAuthentication Start SOTER biometric authentication
ft.checkIsSupportSoterAuthentication Get the SOTER biometric authentication methods supported by the device
ft.checkIsSoterEnrolledInDevice Check if biometric information such as fingerprints has been enrolled on the device

# 14.10 Fitness

Please Note

The following APIs are not yet supported

Name Description
ft.shareToWeRun Share data to fitness
ft.getWeRunData Get the user's step count for the past thirty days

# 14.11 Subscription Messages

Please Note

The ft.requestSubscribeMessage message subscription API is already supported. For details, refer to the Mini-Program Message Subscription Push Process

Please Note

The following APIs are not yet supported

Name Description
ft.requestSubscribeDeviceMessage Subscribe to device messages interface, displays an authorization dialog when called

# 14.12 WeChat Red Packets

Please Note

The following APIs are not yet supported

Name Description
ft.showRedPackage Retrieve the h5 page for claiming red packet cover

# 14.13 Favorites

Please Note

The following APIs are not yet supported

Name Description
ft.addVideoToFavorites Favorite a video
ft.addFileToFavorites Favorite a file

# 14.14 License Plate

Please Note

The following APIs are not yet supported

Name Description
ft.chooseLicensePlate Select a license plate number

# 14.15 Channels

Please Note

The following APIs are not yet supported

Name Description
ft.reserveChannelsLive Reserve a Channels live stream
ft.openChannelsUserProfile Open the Channels profile page
ft.openChannelsEvent Open the Channels event page
ft.openChannelsLive Open a Channels live stream
ft.getChannelsShareKey Get the share source of a Channels live stream card/video card
ft.openChannelsActivity Open a Channels video
ft.getChannelsLiveNoticeInfo Get Channels live stream notice information
ft.getChannelsLiveInfo Get Channels live stream information

# 14.16 Group

Please Note

The following APIs are not yet supported

Name Description
ft.getGroupEnterInfo Get the Mini-Program launch information in a group chat scenario

# 14.17 Customer Service

Please Note

The following APIs are not yet supported

Name Description
ft.openCustomerServiceChat Open the customer service chat window

# 15. Device

# 15.1 Bluetooth - General

Name Description Version Notes
ft.stopBluetoothDevicesDiscovery Stop searching for nearby Bluetooth peripheral devices 1.0.0
ft.startBluetoothDevicesDiscovery Start searching for nearby Bluetooth peripheral devices 1.0.0
ft.openBluetoothAdapter Initialize the Bluetooth module 1.0.0
ft.onBluetoothDeviceFound Listen for events when a new device is discovered 1.0.0
ft.onBluetoothAdapterStateChange Listen for Bluetooth adapter state change events 1.0.0
ft.offBluetoothDeviceFound Stop listening for events when a new device is discovered 1.0.0
ft.offBluetoothAdapterStateChange Stop listening for Bluetooth adapter state change events 1.0.0
ft.makeBluetoothPair Bluetooth pairing interface, only supported on Android 1.0.0
ft.getConnectedBluetoothDevices Get connected Bluetooth devices based on the primary service UUID 1.0.0
ft.getBluetoothDevices Get all Bluetooth devices discovered during the Bluetooth module's active period 1.0.0
ft.getBluetoothAdapterState Get the local Bluetooth adapter state 1.0.0
ft.closeBluetoothAdapter Close the Bluetooth module 1.0.0

# 15.2 Bluetooth - Low Energy Central Device

Name Description Version Notes
ft.writeBLECharacteristicValue Write binary data to a Bluetooth Low Energy device characteristic value 1.0.0
ft.setBLEMTU Negotiate and set the Maximum Transmission Unit (MTU) for Bluetooth Low Energy 1.0.0
ft.readBLECharacteristicValue Read binary data from a Bluetooth Low Energy device characteristic value 1.0.0
ft.onBLEConnectionStateChange Listen for Bluetooth Low Energy connection state change events 1.0.0
ft.onBLECharacteristicValueChange Listen for Bluetooth Low Energy device characteristic value change events 1.0.0
ft.offBLEConnectionStateChange Stop listening for Bluetooth Low Energy connection state change events 1.0.0
ft.offBLECharacteristicValueChange Stop listening for Bluetooth Low Energy device characteristic value change events 1.0.0
ft.notifyBLECharacteristicValueChange Enable the notify function when a Bluetooth Low Energy device characteristic value changes, subscribe to characteristics 1.0.0
ft.getBLEDeviceServices Get all services of a Bluetooth Low Energy device 1.0.0
ft.getBLEDeviceRSSI Get the Received Signal Strength Indication (RSSI) of a Bluetooth Low Energy device 1.0.0
ft.getBLEDeviceCharacteristics Get all characteristics in a specific service of a Bluetooth Low Energy device 1.0.0
ft.createBLEConnection Connect to a Bluetooth Low Energy device 1.0.0
ft.closeBLEConnection Disconnect from a Bluetooth Low Energy device 1.0.0

Please Note

The following APIs are not yet supported

Name Description
ft.isBluetoothDevicePaired Check if a Bluetooth device is paired, only supported on Android
ft.onBLEMTUChange Listen for Bluetooth Low Energy MTU change events (only triggered on Android)
ft.offBLEMTUChange Remove the listener for Bluetooth Low Energy MTU change events
ft.getBLEMTU Get the Bluetooth Low Energy MTU

# 15.3 Bluetooth - Low Energy Peripheral Device

Name Description Version Notes
ft.onBLEPeripheralConnectionStateChanged Listen for events when the current peripheral device is connected or disconnected 1.0.0
ft.offBLEPeripheralConnectionStateChanged Stop listening for events when the current peripheral device is connected or disconnected 1.0.0
ft.createBLEPeripheralServer Create a local server as a Bluetooth Low Energy peripheral device, multiple servers can be created 1.0.0

# 15.3.1 BLEPeripheralServer

Name Description Version Notes
BLEPeripheralServer.addService Add a service 1.0.0
BLEPeripheralServer.close Close the current server 1.0.0
BLEPeripheralServer.offCharacteristicReadRequest Stop listening for events when a connected device requests to read the current peripheral device's characteristic value 1.0.0
BLEPeripheralServer.offCharacteristicSubscribed Stop listening for characteristic subscription events 1.0.0
BLEPeripheralServer.offcharacteristicUnsubscribed Stop listening for characteristic unsubscription events 1.0.0
BLEPeripheralServer.offCharacteristicWriteRequest Stop listening for events when a connected device requests to write to the current peripheral device's characteristic value 1.0.0
BLEPeripheralServer.onCharacteristicReadRequest Listen for events when a connected device requests to read the current peripheral device's characteristic value 1.0.0
BLEPeripheralServer.onCharacteristicSubscribed Listen for characteristic subscription events, only supported on iOS 1.0.0
BLEPeripheralServer.onCharacteristicUnsubscribed Listen for characteristic unsubscription events, only supported on iOS 1.0.0
BLEPeripheralServer.onCharacteristicWriteRequest Listen for events when a connected device requests to write to the current peripheral device's characteristic value 1.0.0
BLEPeripheralServer.removeService Remove a service 1.0.0
BLEPeripheralServer.startAdvertising Start advertising the locally created peripheral device 1.0.0
BLEPeripheralServer.stopAdvertising Stop advertising 1.0.0
BLEPeripheralServer.writeCharacteristicValue Write data to a specified characteristic value and notify the connected central device that the peripheral's characteristic value has changed. This interface handles whether to use a response packet or subscription 1.0.0

# 15.4 Bluetooth - Beacon

Name Description Version Notes
ft.stopBeaconDiscovery Stop searching for nearby Beacon devices 1.0.0
ft.startBeaconDiscovery Start searching for nearby Beacon devices 1.0.0
ft.onBeaconUpdate Listen for Beacon device update events, only one listener can be registered 1.0.0
ft.onBeaconServiceChange Listen for Beacon service state change events, only one listener can be registered 1.0.0
ft.offBeaconUpdate Stop listening for Beacon device update events 1.0.0
ft.offBeaconServiceChange Stop listening for Beacon service state change events 1.0.0
ft.getBeacons Get all discovered Beacon devices 1.0.0
BeaconInfo Beacon device 1.0.0

# 15.5 NFC

Name Description Version
ft.getNFCAdapter Get an NFC instance 3.2.2

Please Note

The following APIs are not yet supported

Name Description
ft.stopHCE Close the NFC module
ft.startHCE Initialize the NFC module
ft.sendHCEMessage Send an NFC message
ft.onHCEMessage Listen for events when receiving NFC device messages, only one listener can be registered
ft.offHCEMessage Stop listening for NFC device message events
ft.getHCEState Check if the current device supports HCE capability

# 15.5.1 IsoDep

Name Description Version
IsoDep.close Disconnect 3.2.2
IsoDep.connect Connect to an NFC tag 3.2.2
IsoDep.getHistoricalBytes Get reset information 3.2.2
IsoDep.getMaxTransceiveLength Get the maximum transmission length 3.2.2
IsoDep.isConnected Check if connected 3.2.2
IsoDep.setTimeout Set the timeout 3.2.2
IsoDep.transceive Send data 3.2.2

# 15.5.2 MifareClassic

Name Description Version
MifareClassic.close Disconnect 3.2.2
MifareClassic.connect Connect to an NFC tag 3.2.2
MifareClassic.getMaxTransceiveLength Get the maximum transmission length 3.2.2
MifareClassic.isConnected Check if connected 3.2.2
MifareClassic.setTimeout Set the timeout 3.2.2
MifareClassic.transceive Send data 3.2.2

# 15.5.2 MifareUltralight

Name Description Version
MifareUltralight.close Disconnect 3.2.2
MifareUltralight.connect Connect to NFC tag 3.2.2
MifareUltralight.getMaxTransceiveLength Get maximum transmission length 3.2.2
MifareUltralight.isConnected Check if connected 3.2.2
MifareUltralight.setTimeout Set timeout 3.2.2
MifareUltralight.transceive Send data 3.2.2

# 15.5.3 Ndef

Name Description Version
Ndef.close Disconnect 3.2.2
Ndef.connect Connect to NFC tag 3.2.2
Ndef.isConnected Check if connected 3.2.2
Ndef.offNdefMessage Unlisten to Ndef message 3.2.2
Ndef.onNdefMessage Listen to Ndef message 3.2.2
Ndef.setTimeout Set timeout 3.2.2
Ndef.writeNdefMessage Rewrite Ndef tag content 3.2.2

# 15.5.4 NfcA

Name Description Version
NfcA.close Disconnect 3.2.2
NfcA.connect Connect to NFC tag 3.2.2
NfcA.getAtqa Get ATQA information 3.2.2
NfcA.getMaxTransceiveLength Get maximum transmission length 3.2.2
NfcA.getSak Get SAK information 3.2.2
NfcA.isConnected Check if connected 3.2.2
NfcA.setTimeout Set timeout 3.2.2
NfcA.transceive Send data 3.2.2

# 15.5.5 NFCAdapter

Name Description Version
NFCAdapter.getIsoDep Get IsoDep instance, supporting ISO-DEP (ISO 14443-4) standard read/write 3.2.2
NFCAdapter.getMifareClassic Get MifareClassic instance, supporting MIFARE Classic tag read/write 3.2.2
NFCAdapter.getMifareUltralight Get MifareUltralight instance, supporting MIFARE Ultralight tag read/write 3.2.2
NFCAdapter.getNdef Get Ndef instance, supporting NDEF data read/write on NDEF-formatted NFC tags 3.2.2
NFCAdapter.getNfcA Get NfcA instance, supporting NFC-A (ISO 14443-3A) standard read/write 3.2.2
NFCAdapter.getNfcB Get NfcB instance, supporting NFC-B (ISO 14443-3B) standard read/write 3.2.2
NFCAdapter.getNfcF Get NfcF instance, supporting NFC-F (JIS 6319-4) standard read/write 3.2.2
NFCAdapter.getNfcV Get NfcV instance, supporting NFC-V (ISO 15693) standard read/write 3.2.2
NFCAdapter.offDiscovered Unlisten to NFC Tag 3.2.2
NFCAdapter.onDiscovered Listen to NFC Tag 3.2.2
NFCAdapter.startDiscovery Start NFC discovery 3.2.2
NFCAdapter.stopDiscovery Stop NFC discovery 3.2.2

# 15.5.6 NfcB

Name Description Version
NfcB.close Disconnect 3.2.2
NfcB.connect Connect to NFC tag 3.2.2
NfcB.getMaxTransceiveLength Get maximum transmission length 3.2.2
NfcB.isConnected Check if connected 3.2.2
NfcB.setTimeout Set timeout 3.2.2
NfcB.transceive Send data 3.2.2

# 15.5.7 NfcF

Name Description Version
NfcF.close Disconnect 3.2.2
NfcF.connect Connect to NFC tag 3.2.2
NfcF.getMaxTransceiveLength Get maximum transmission length 3.2.2
NfcF.isConnected Check if connected 3.2.2
NfcF.setTimeout Set timeout 3.2.2
NfcF.transceive Send data 3.2.2

# 15.5.7 NfcV

Name Description Version
NfcV.close Disconnect 3.2.2
NfcV.connect Connect to NFC tag 3.2.2
NfcV.getMaxTransceiveLength Get maximum transmission length 3.2.2
NfcV.isConnected Check if connected 3.2.2
NfcV.setTimeout Set timeout 3.2.2
NfcV.transceive Send data 3.2.2

# 15.6 Wi-Fi

Please Note

The following APIs are not yet supported

Name Description
ft.stopWifi Close Wi-Fi module
ft.startWifi Initialize Wi-Fi module
ft.setWifiList Set AP-related information in wifiList
ft.onWifiConnected Listen to Wi-Fi connection event
ft.onGetWifiList Listen to Wi-Fi list data retrieval event
ft.getWifiList Request to get Wi-Fi list
ft.getConnectedWifi Get connected Wi-Fi information
ft.connectWifi Connect to Wi-Fi
ft.onWifiConnectedWithPartialInfo Listen to Wi-Fi connection event
ft.offWifiConnectedWithPartialInfo Remove listener for Wi-Fi connection event
ft.offWifiConnected Unlisten to Wi-Fi connection event
ft.offGetWifiList Unlisten to Wi-Fi list data retrieval event
WifiInfo Wi-Fi information

# 15.7 Calendar

Name Description Version Remarks
ft.addPhoneRepeatCalendar Add a recurring event to the system calendar 3.0.46
ft.addPhoneCalendar Add an event to the system calendar 3.0.46

# 15.8 Contacts

Name Description Version Remarks
ft.addPhoneContact Add a contact to the phone's address book 1.0.0
ft.chooseContact Open the phone's address book to select a contact 3.0.0

Please Note

The following APIs are not yet supported

Name Description
ft.searchContacts Search contacts, matching similar phone numbers

# 15.9 Accessibility

Name Description Version Remarks
ft.checkIsOpenAccessibility Check if visual accessibility is enabled 2.12.1

# 15.10 Battery

Please Note

The following APIs are not yet supported

Name Description
ft.getBatteryInfoSync Synchronous version of ft.getBatteryInfo
ft.getBatteryInfo Get device battery level
ft.onBatteryInfoChange Listen to battery information change event
ft.offBatteryInfoChange Unlisten to battery information change event

# 15.11 Clipboard

Name Description Version Remarks
ft.setClipboardData Set the content of the system clipboard 1.0.0
ft.getClipboardData Get the content of the system clipboard 1.0.0

# 15.12 Network

Name Description Version Remarks
ft.onNetworkStatusChange Listen to network status change event 1.0.0
ft.offNetworkStatusChange Unlisten to network status change event; if parameter is empty, all event listeners are removed 1.0.0
ft.getNetworkType Get network type 1.0.0
ft.getLocalIPAddress Get local IP address 3.2.2

Please Note

The following APIs are not yet supported

Name Description
ft.onNetworkWeakChange Listen to weak network status change event
ft.offNetworkWeakChange Remove listener for weak network status change event

# 15.13 Encryption

Name Description Version Remarks
ft.getRandomValues Get cryptographically secure random values 1.0.0

# 15.14 Screen

Name Description Version Remarks
ft.setVisualEffectOnCapture Set screen behavior when screenshot/screen recording, only supported on Android 2.12.16
ft.setScreenBrightness Set screen brightness 1.0.0
ft.setKeepScreenOn Set whether to keep the screen always on 1.3.9
ft.onUserCaptureScreen Listen to user screenshot event 1.0.0
ft.onScreenRecordingStateChanged Listen to user screen recording event, only supported on iOS 2.12.16
ft.offUserCaptureScreen User screenshot event 1.0.0
ft.offScreenRecordingStateChanged Remove listener for user screen recording event 2.12.16
ft.getScreenRecordingState Query if the user is screen recording 2.12.16 Not supported on Android
ft.getScreenBrightness Get screen brightness 1.0.0

# 15.15 Keyboard

Name Description Version Remarks
ft.onKeyboardHeightChange Listen to keyboard height change 1.0.0
ft.offKeyboardHeightChange Unlisten to keyboard height change event 1.0.0
ft.hideKeyboard After the keyboard is brought up by focusing on input, textarea, etc., manually call this API to dismiss the keyboard 1.0.0
ft.getSelectedTextRange After focusing on input, textarea, etc., get the cursor position in the input field 1.0.0

Please Note

The following APIs are not yet supported

Name Description
ft.onKeyUp Listen to global keyboard key release event
ft.onKeyDown Listen to global keyboard key press event
ft.offKeyUp Remove listener for global keyboard key release event
ft.offKeyDown Remove listener for global keyboard key press event

# 15.16 Phone

Name Description Version Remarks
ft.makePhoneCall Make a phone call 1.0.0

# 15.17 Accelerometer

Name Description Version Remarks
ft.stopAccelerometer Stop listening to accelerometer data 1.0.0
ft.startAccelerometer Start listening to accelerometer data 1.0.0
ft.onAccelerometerChange Listen to accelerometer data event 1.0.0
ft.offAccelerometerChange Unlisten to accelerometer data event; if parameter is empty, all event listeners are removed 1.0.0

# 15.18 Compass

Name Description Version Remarks
ft.stopCompass Stop listening to compass data 1.0.0
ft.startCompass Start listening to compass data 1.0.0
ft.onCompassChange Listen to compass data change event 1.0.0
ft.offCompassChange Unlisten to compass data change event; if parameter is empty, all event listeners are removed 1.0.0

# 15.19 Device Motion

Name Description Version Remarks
ft.stopDeviceMotionListening Stop listening to device motion changes
ft.startDeviceMotionListening Start listening to device motion changes
ft.onDeviceMotionChange Listen to device motion change event
ft.offDeviceMotionChange Unlisten to device motion change event; if parameter is empty, all event listeners are removed

# 15.20 Gyroscope

Name Description Version Remarks
ft.stopGyroscope Stop listening to gyroscope data 3.0.46
ft.startGyroscope Start listening to gyroscope data 3.0.46
ft.onGyroscopeChange Listen to gyroscope data change event 3.0.46
ft.offGyroscopeChange Unlisten to gyroscope data change event 3.0.46

# 15.21 Memory

Name Description Version Remarks
ft.onMemoryWarning Listen to low memory warning event 3.1.17
ft.offMemoryWarning Remove listener for low memory warning event 3.1.17

# 15.22 Scan Code

Name Description Version Remarks
ft.scanCode Invoke the client's scan code interface to scan a code 1.0.0

# 15.23 Vibration

Name Description Version Remarks
ft.vibrateShort Vibrate the phone for a short duration (15 ms) 1.0.0
ft.vibrateLong Vibrate the phone for a long duration (400 ms) 1.0.0

# 15.24 SMS

Name Description Version Remarks
ft.sendSms Opens the SMS sending interface on the device 3.5.1

# 16. Worker

Name Description Version Remarks
ft.createWorker Creates a Worker instance 3.0.0

# 16.1 Worker

| Worker.onMessage | Listens for messages sent from the main thread or Worker thread to the current thread | 3.0.0 | | | Worker.postMessage | Sends messages to the main thread or Worker thread | 3.0.0 | | | Worker.terminate | Terminates the current Worker thread | 3.0.0 | |

Note

The following APIs are not yet supported

Name Description
Worker.getCameraFrameData Gets the current frame image from the camera, returns ArrayBuffer data
Worker.onProcessKilled Listens for the event when the Worker thread is reclaimed by the system (when iOS system resources are tight, the Worker thread may be reclaimed; developers can listen for this event and create a new Worker)
Worker.testOnProcessKilled Used to simulate the iOS ExperimentalWorker thread being reclaimed by the system for debugging purposes. This API is only available within the Worker thread.

# 17. FXML

Name Description Version Remarks
ft.createSelectorQuery Returns a SelectorQuery object instance 1.0.0
ft.createIntersectionObserver Creates and returns an IntersectionObserver object instance 1.0.0

# 17.1 IntersectionObserver

Name Description Version Remarks
IntersectionObserver.disconnect Stops observing 1.0.0
IntersectionObserver.observe Specifies the target node and starts observing intersection status changes 1.0.0
IntersectionObserver.relativeTo Uses a selector to specify a node as one of the reference areas 1.0.0
IntersectionObserver.relativeToViewport Specifies the page display area as one of the reference areas 1.0.0

# 17.2 MediaQueryObserver

Name Description Version Remarks
MediaQueryObserver.disconnect Stops observing 1.0.0
MediaQueryObserver.observe Starts observing page media query changes 1.0.0

# 17.3 NodesRef

Name Description Version Remarks
NodesRef.boundingClientRect Adds a query request for the node's layout position 1.0.0
NodesRef.context Adds a query request for the node's Context object 1.0.0
NodesRef.fields Gets information about the node 1.0.0
NodesRef.scrollOffset Adds a query request for the node's scroll position 1.0.0
NodesRef.node Gets the Node instance 2.12.12

Note

The following APIs are not yet supported

Name Description
NodesRef.ref Gets the Ref object of the Node, which can be used to manipulate nodes within worklet functions. Only supported under Skyline.

# 17.4 SelectorQuery

Name Description Version Remarks
SelectorQuery.exec Executes all requests 1.0.0
SelectorQuery.in Changes the selector's scope to within the custom component 1.0.0
SelectorQuery.select Selects the first node matching the selector on the current page 1.0.0
SelectorQuery.selectAll Selects all nodes matching the selector on the current page 1.0.0
SelectorQuery.selectViewport Selects the display area 1.0.0

# 18. Advertising

Note

The following API implementations require App support. Click here for details

Name Description Version Remarks
ft.createInterstitialAd Creates an interstitial ad component 3.5.4
ft.createRewardedVideoAd Creates a rewarded video ad component 3.5.4

# 18.1 InterstitialAd

Name Description Version Remarks
InterstitialAd.destroy Destroys the interstitial ad instance 3.5.4
InterstitialAd.load Loads the interstitial ad 3.5.4
InterstitialAd.offClose Removes the listener for the interstitial ad close event 3.5.4
InterstitialAd.offError Removes the listener for the interstitial ad error event 3.5.4
InterstitialAd.offLoad Removes the listener for the interstitial ad load event 3.5.4
InterstitialAd.onClose Listens for the interstitial ad close event 3.5.4
InterstitialAd.onError Listens for the interstitial ad error event 3.5.4
InterstitialAd.onLoad Listens for the interstitial ad load event 3.5.4
InterstitialAd.show Displays the interstitial ad 3.5.4

# 18.2 RewardedVideoAd

Name Description Version Remarks
RewardedVideoAd.destroy Destroys the rewarded video ad instance 3.5.4
RewardedVideoAd.load Loads the rewarded video ad 3.5.4
RewardedVideoAd.offClose Removes the listener for the user clicking the "Close Ad" button event 3.5.4
RewardedVideoAd.offError Removes the listener for the rewarded video ad error event 3.5.4
RewardedVideoAd.offLoad Removes the listener for the rewarded video ad load event 3.5.4
RewardedVideoAd.onClose Listens for the user clicking the "Close Ad" button event 3.5.4
RewardedVideoAd.onError Listens for the rewarded video ad error event 3.5.4
RewardedVideoAd.onLoad Listens for the rewarded video ad load event 3.5.4
RewardedVideoAd.show Displays the rewarded video ad 3.5.4

# 19. Custom Events and Others

Name Description
ft.onCustomEvent Listens for the onCustomEvent event dispatched natively
ft.offCustomEvent Stops listening for the onCustomEvent event dispatched natively
ft.addCustomEventListener Listens for events dispatched natively
ft.removeCustomEventListener Stops listening for events dispatched natively
ft.sendWebviewEvent Sends an event from the Mini-Program to H5
ft.getSuperviseInfo Gets monitoring information
ft.reportEvent Reports an event
ft.loadExtApi Loads custom API configurations

# 20. AI

# 20.1 Vision Algorithms

Note

The following APIs are not yet supported

Name Description
ft.isVKSupport Checks the supported version
ft.createVKSession Creates a vision kit session object
VKBodyAnchor Body anchor

# 20.2 VKCamera

Note

The following APIs are not yet supported

Name Description
VKCamera.getProjectionMatrix Gets the projection matrix
VKFaceAnchor Face anchor

# 20.3 VKFrame

Note

The following APIs are not yet supported

Name Description
VKFrame.getCameraBuffer Gets the current frame rgba buffer
VKFrame.getCameraTexture Gets the current frame texture, currently only supports YUV textures
VKFrame.getDisplayTransform Gets the texture adjustment matrix
VKMarkerAnchor Marker anchor
VKOSDAnchor OSD anchor
VKHandAnchor Hand anchor
VKPlaneAnchor Plane anchor, only supported in v2

# 20.4 VKSession

Note

The following APIs are not yet supported

Name Description
VKSession.addMarker Adds a marker, requires track.marker to be true when calling ft.createVKSession
VKSession.addOSDMarker Adds an OSD marker (one-shot detection marker), requires track.OSD to be true when calling ft.createVKSession
VKSession.cancelAnimationFrame Cancels an animation frame request scheduled by requestAnimationFrame
VKSession.destroy Destroys the session
VKSession.detectFace Detects facial keypoints in a static image
VKSession.getAllMarker Gets all markers, requires track.marker to be true when calling ft.createVKSession
VKSession.getAllOSDMarker Gets all OSD markers, requires track.OSD to be true when calling ft.createVKSession
VKSession.getVKFrame Gets the frame object, each call triggers a frame analysis process
VKSession.hitTest Touch detection, v1 only supports a single plane (i.e., after hitTest generates a plane once, subsequent hitTest calls will not generate new planes but will detect based on the previously generated plane)
VKSession.detectHand Detects hand keypoints in a static image. Available when ft.createVKSession parameters include {track: {hand: {mode: 2} } }.
VKSession.detectBody Detects body keypoints in a static image. Available when ft.createVKSession parameters include {track: {body: {mode: 2} } }.
VKSession.off Stops listening for session events
VKSession.on Listens for session events
VKSession.runOCR Performs OCR detection on a static image. Available when ft.createVKSession parameters include {track: {OCR: {mode: 2} } }.
VKSession.removeMarker Removes a marker, requires track.marker to be true when calling ft.createVKSession
VKSession.removeOSDMarker Removes an OSD marker, requires track.OSD to be true when calling ft.createVKSession
VKSession.requestAnimationFrame Executes on the next repaint
VKSession.start Starts the session
VKSession.stop Stops the session
VKSession.updateOSDThreshold Updates the OSD recognition accuracy, requires track.OSD to be true when calling ft.createVKSession

# 20.5 Face Recognition

Note

The following APIs are not yet supported, but you can refer to FinClip Financial Scenario APIs for corresponding information.

Name Description
ft.stopFaceDetect Stops face recognition
ft.initFaceDetect Initializes face recognition
ft.faceDetect Performs face recognition. Requires initialization via ft.initFaceDetect before use. It is recommended to use frame data returned by the camera interface.

# 21. Third-Party Platforms

Note

The following APIs are not yet supported

Name Description
ft.getExtConfigSync Synchronous version of ft.getExtConfig
ft.getExtConfig Gets custom data fields from the third-party platform
© FinClip with ❤ , Since 2017