# Plug-in call API Limitations of
That the plug-in can call API Unlike Mini programs, there are two main differences:
- The list of domain names requested by the plug-in is independent of the Mini Program
- some API Plug-in calls are not allowed (these functions do not exist in
wx
Object under).
Some interfaces are not available in plug-ins, but can be done through the plug-in features page, see Plugin Function Page。
The support of each interface in the plug-in can be confirmed in the documentation of each interface. This interface from the base library 2.1.0 Support for the use of Mini Program plug-ins The identification ofIf there is no logo, the plugin is not supported yet, if there are specific use cases and requirements that need to be reflected in the developer community.
The following table summarizes the current plug-ins that can be called API And its corresponding version requirements,But this form is no longer updated, whether it can be used, please refer to the instructions in the specific interface document and the real machine performance shall prevail.。
Plug-in Support Interface Reference Summary (Table is out of maintenance)
# Basics
API | Minimum version | Remarks |
---|---|---|
wx.arrayBufferToBase64 | ||
wx.base64ToArrayBuffer |
# Initiate a request
API | Minimum version | Remarks |
---|---|---|
wx.request | 1.9.6 |
# Upload, Download
API | Minimum version | Remarks |
---|---|---|
wx.downloadFile | 1.9.6 | |
wx.uploadFile | 1.9.6 |
# WebSocket
API | Minimum version | Remarks |
---|---|---|
wx.connectSocket | 1.9.6 |
# picture
API | Minimum version | Remarks |
---|---|---|
wx.previewImage | 1.9.6 | |
wx.chooseImage | 1.9.6 | |
wx.getImageInfo | 1.9.6 | |
wx.saveImageToPhotosAlbum | 1.9.6 |
# Sound recording
API | Minimum version | Remarks |
---|---|---|
wx.startRecord | 1.9.6 | |
wx.stopRecord | 1.9.6 |
# Real-time audio and video
API | Minimum version | Remarks |
---|---|---|
wx.createLivePlayerContext | 1.9.6 | |
wx.createLivePusherContext | 1.9.6 |
# Recording management
API | Minimum version | Remarks |
---|---|---|
wx.getRecorderManager | 1.9.94 |
# Audio playback control
API | Minimum version | Remarks |
---|---|---|
wx.pauseVoice | 1.9.6 | |
wx.playVoice | 1.9.6 | |
wx.stopVoice | 1.9.6 |
# Music playback control
# Background audio playback management
API | Minimum version | Remarks |
---|---|---|
wx.getBackgroundAudioManager | 1.9.6 |
# Audio Component Control
API | Minimum version | Remarks |
---|---|---|
wx.createInnerAudioContext | 1.9.6 | |
wx.createAudioContext | 1.9.6 |
# video
API | Minimum version | Remarks |
---|---|---|
wx.chooseVideo | 1.9.6 | |
wx.saveVideoToPhotosAlbum | 1.9.6 |
# Video Component Control
API | Minimum version | Remarks |
---|---|---|
wx.createVideoContext | 1.9.6 |
# Camera Component Control
API | Minimum version | Remarks |
---|---|---|
wx.createCameraContext | 1.9.6 |
# Data cache
API | Minimum version | Remarks |
---|---|---|
wx.setStorage | 1.9.6 | |
wx.getStorage | 1.9.6 | |
wx.removeStorage | 1.9.6 | |
[wx.setStorageSync ]((wx.setStorageSync )) | 1.9.6 | |
[wx.getStorageSync ]((wx.getStorageSync )) | 1.9.6 | |
[wx.removeStorageSync ]((wx.removeStorageSync )) | 1.9.6 |
# Get the location
API | Minimum version | Remarks |
---|---|---|
wx.getLocation | 1.9.6 | |
wx.chooseLocation | 1.9.6 | |
wx.onLocationChange | 2.8.0 | |
wx.offLocationChange | 2.9.1 | |
wx.stopLocationUpdate | 2.8.0 | |
wx.startLocationUpdate | 2.8.0 |
# View Location
API | Minimum version | Remarks |
---|---|---|
wx.openLocation | 1.9.6 |
# Map Component Control
API | Minimum version | Remarks |
---|---|---|
wx.createMapContext | 1.9.6 |
# System information
API | Minimum version | Remarks |
---|---|---|
wx.getSystemInfoSync | 1.9.6 | |
wx.getSystemInfo | 1.9.6 |
# Screen brightness
API | Minimum version | Remarks |
---|---|---|
wx.setKeepScreenOn | 1.9.6 | |
wx.setScreenBrightness | 1.9.6 | |
wx.getScreenBrightness | 1.9.6 |
# User Screenshot Event
API | Minimum version | Remarks |
---|---|---|
wx.onUserCaptureScreen | 1.9.6 | Calls in the plugin page only |
wx.offUserCaptureScreen | 2.9.1 | Calls in the plugin page only |
# vibration
API | Minimum version | Remarks |
---|---|---|
wx.vibrateLong | 1.9.6 | |
wx.vibrateShort | 1.9.6 |
# Cell Phone Contacts
API | Minimum version | Remarks |
---|---|---|
wx.addPhoneContact | 1.9.6 |
# NFC
API | Minimum version | Remarks |
---|---|---|
wx.sendHCEMessage | 2.1.0 | |
wx.stopHCE | 2.1.0 | |
wx.onHCEMessage | 2.1.0 | |
wx.offHCEMessage | 2.9.1 | |
wx.startHCE | 2.1.0 | |
wx.getHCEState | 2.1.0 |
# Network state
API | Minimum version | Remarks |
---|---|---|
wx.onNetworkStatusChange | 1.9.6 | |
wx.offNetworkStatusChange | 2.9.1 | |
wx.getNetworkType | 1.9.6 |
# Accelerometer
API | Minimum version | Remarks |
---|---|---|
wx.startAccelerometer | 1.9.6 | |
wx.stopAccelerometer | 1.9.6 | |
wx.onAccelerometerChange | 1.9.6 | |
wx.offAccelerometerChange | 2.9.1 |
# Direction of equipment
API | Minimum version | Remarks |
---|---|---|
[wx.startDeviceMotionListening ]((wx.startDeviceMotionListening )) | 2.9.1 | |
wx.stopDeviceMotionListening | 2.9.1 | |
wx.offDeviceMotionChange | 2.9.1 | |
wx.onDeviceMotionChange | 2.9.1 |
# gyroscope
API | Minimum version | Remarks |
---|---|---|
wx.startGyroscope | 2.9.1 | |
wx.stopGyroscope | 2.9.1 | |
wx.offGyroscopeChange | 2.9.1 | |
wx.onGyroscopeChange | 2.9.1 |
# Luopan
API | Minimum version | Remarks |
---|---|---|
wx.onCompassChange | 1.9.6 | |
wx.offCompassChange | 2.9.1 | |
wx.stopCompass | 1.9.6 | |
wx.startCompass | 1.9.6 |
# Make a call
API | Minimum version | Remarks |
---|---|---|
wx.makePhoneCall | 1.9.6 |
# Scan code
API | Minimum version | Remarks |
---|---|---|
wx.scanCode | 1.9.6 |
# clipboard
API | Minimum version | Remarks |
---|---|---|
wx.setClipboardData | 1.9.6 | |
wx.getClipboardData | 1.9.6 |
# Bluetooth
API | Minimum version | Remarks |
---|---|---|
wx.writeBLECharacteristicValue | 1.9.6 | |
wx.startBluetoothDevicesDiscovery | 1.9.6 | |
wx.getConnectedBluetoothDevices | 1.9.6 | |
wx.notifyBLECharacteristicValueChange | 1.9.6 | |
wx.onBluetoothDeviceFound | 1.9.6 | |
wx.offBluetoothDeviceFound | 2.9.1 | |
wx.readBLECharacteristicValue | 1.9.6 | |
wx.openBluetoothAdapter | 1.9.6 | |
wx.getBLEDeviceCharacteristics | 1.9.6 | |
wx.stopBluetoothDevicesDiscovery | 1.9.6 | |
wx.onBLEConnectionStateChange | 1.9.6 | |
wx.getBluetoothDevices | 1.9.6 | |
[wx.getBluetoothAdapterState ]((wx.getBluetoothAdapterState )) | 1.9.6 | |
wx.onBluetoothAdapterStateChange | 1.9.6 | |
[wx.offBluetoothAdapterStateChange ]((wx.offBluetoothAdapterStateChange )) | 2.9.1 | |
wx.getBLEDeviceServices | 1.9.6 | |
wx.onBLECharacteristicValueChange | 1.9.6 | |
wx.offBLECharacteristicValueChange | 2.9.1 | |
wx.createBLEConnection | 1.9.6 | |
wx.closeBluetoothAdapter | 1.9.6 | |
wx.closeBLEConnection | 1.9.6 | |
wx.notifyBLECharacteristicValueChange | 1.9.6 | |
wx.onBLEConnectionStateChange | 1.9.6 | |
wx.offBLEConnectionStateChange | 2.9.1 |
# iBeacon
API | Minimum version | Remarks |
---|---|---|
wx.getBeacons | 1.9.6 | |
wx.startBeaconDiscovery | 1.9.6 | |
wx.onBeaconServiceChange | 1.9.6 | |
[wx.offBeaconServiceChange ]((wx.offBeaconServiceChange )) | 2.9.1 | |
[wx.onBeaconUpdate ]((wx.onBeaconUpdate )) | 1.9.6 | |
[wx.offBeaconUpdate ]((wx.offBeaconUpdate )) | 2.9.1 | |
wx.stopBeaconDiscovery | 1.9.6 |
# Wi-Fi
# Interactive feedback
API | Minimum version | Remarks |
---|---|---|
wx.hideLoading | 1.9.6 | |
wx.showActionSheet | 1.9.6 | |
wx.showLoading | 1.9.6 | |
wx.hideToast | 1.9.6 | |
wx.showToast | 1.9.6 | |
wx.showModal | 1.9.6 |
# Set the navigation bar
API | Minimum version | Remarks |
---|---|---|
wx.showNavigationBarLoading | 2.1.0 | Calls in the plugin page only |
wx.hideNavigationBarLoading | 2.1.0 | Calls in the plugin page only |
wx.setNavigationBarColor | 2.1.0 | Calls in the plugin page only |
wx.setNavigationBarTitle | 2.1.0 | Calls in the plugin page only |
# background
API | Minimum version | Remarks |
---|---|---|
wx.setBackgroundColor | 2.4.0 | Calls in the plugin page only |
wx.setBackgroundTextStyle | 2.4.0 | Calls in the plugin page only |
# WXML Node information
API | Minimum version | Remarks |
---|---|---|
wx.createSelectorQuery | 1.9.6 |
# WXML Node layout intersection state
API | Minimum version | Remarks |
---|---|---|
wx.createIntersectionObserver | 1.9.6 |
# navigation
API | Minimum version | Remarks |
---|---|---|
[wx.navigateBack ]((wx.navigateBack )) | 2.1.0 | Calls in the plugin page only |
[wx.navigateTo ]((wx.navigateTo )) | 2.2.2 | Calls in the plugin page only |
wx.redirectTo | 2.2.2 | Calls in the plugin page only |
wx.switchTab | 2.3.1 | Calls in the plugin page only |
wx.reLaunch | 2.3.1 | Calls in the plugin page only |
# animation
API | Minimum version | Remarks |
---|---|---|
wx.createAnimation | 1.9.6 |
# position
API | Minimum version | Remarks |
---|---|---|
wx.pageScrollTo | 2.1.0 | Calls in the plugin page only |
# Mapping
API | Minimum version | Remarks |
---|---|---|
wx.createOffscreenCanvas | 2.7.1 | |
wx.canvasPutImageData | 1.9.6 | |
wx.canvasToTempFilePath | 1.9.6 | |
wx.createCanvasContext | 1.9.6 | |
wx.canvasGetImageData | 1.9.6 |
# Drop Down Refresh
API | Minimum version | Remarks |
---|---|---|
wx.stopPullDownRefresh | 2.1.0 | Calls in the plugin page only |
wx.startPullDownRefresh | 2.1.0 | Calls in the plugin page only |
# Current account information
API | Minimum version | Remarks |
---|---|---|
[wx.getAccountInfoSync ]((wx.getAccountInfoSync )) | 2.2.2 |
# Forward
API | Minimum version | Remarks |
---|---|---|
wx.hideShareMenu | 2.1.0 | Calls in the plugin page only |
wx.getShareInfo | 2.1.0 | Calls in the plugin page only |
wx.showShareMenu | 2.1.0 | Calls in the plugin page only |
wx.updateShareMenu | 2.1.0 | Calls in the plugin page only |
# Real Time Log
API | Minimum version | Remarks |
---|---|---|
wx.getRealtimeLogManager | 2.16.0 |
# Other
API | Minimum version | Remarks |
---|---|---|
wx.getSetting | 2.6.3 | |
wx.openSetting | 2.10.3 | |
[wx.reportAnalytics ]((wx.reportAnalytics )) | 1.9.6 | See below for notes |
# Login and Get User Information
This set of interfaces is invoked only after the user has authorized it in the user information function page. Otherwise it will return fail For details see User Information Features Page 。
# Bugs & Tips
- [wx.reportAnalytics ]((wx.reportAnalytics )) Can be called normally, but is not currently being shown statistically.