# Plug-in Call API Limitations
The API that plug-ins can call is different from Weixin Mini Program. There are two main differences:
- The plug-in's request domain list is independent of Weixin Mini Program;
- Some APIs do not allow plug-in calls (these functions do not exist under the
wxobject).
Some interfaces can not be used in plug-ins, but can be achieved through the plug-in function page, please refer to the plug-in function page .
Support for each interface in the plug-in can be confirmed in the interface documentation, which contains identifiers such as_"This interface is supported for use in Weixin Mini Program plug-ins since base library 2.1.0";If there is no identification, it indicates that the plug-in is not supported yet, and if there are specific use cases and needs that need to be reported in the developer community.
The following table summarizes the APIs currently called by the plug-in and their corresponding version requirements,. However, this table is no longer updated and is usable depending on the descriptions and real-world performance in the specific interface documentation.
Reference summary of plug-in support interface status (tables have been stopped maintenance)
# Basics
| API | Minimum version | Remarks |
|---|---|---|
| wx.arrayBufferToBase64 | ||
| wx.base64ToArrayBuffer |
# Initiate 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 |
# Live 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 | 1.9.6 | |
| wx.getStorageSync | 1.9.6 | |
| wx.removeStorageSync | 1.9.6 |
# Get 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 | Callable only in the plugin page |
| wx.offUserCaptureScreen | 2.9.1 | Callable only in the plugin page |
# vibration
| API | Minimum version | Remarks |
|---|---|---|
| wx.vibrateLong | 1.9.6 | |
| wx.vibrateShort | 1.9.6 |
# Mobile 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 Status
| API | Minimum version | Remarks |
|---|---|---|
| wx.onNetworkStatusChange | 1.9.6 | |
| wx.offNetworkStatusChange | 2.9.1 | |
| wx.getNetworkType | 1.9.6 |
# An 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 |
# Device direction
| API | Minimum version | Remarks |
|---|---|---|
| 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 |
# Call
| API | Minimum version | Remarks |
|---|---|---|
| wx.makePhoneCall | 1.9.6 |
# Scan the 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
# iBeacon
# 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 navigation bar
| API | Minimum version | Remarks |
|---|---|---|
| wx.showNavigationBarLoading | 2.1.0 | Callable only in the plugin page |
| wx.hideNavigationBarLoading | 2.1.0 | Callable only in the plugin page |
| wx.setNavigationBarColor | 2.1.0 | Callable only in the plugin page |
| wx.setNavigationBarTitle | 2.1.0 | Callable only in the plugin page |
# background
| API | Minimum version | Remarks |
|---|---|---|
| wx.setBackgroundColor | 2.4.0 | Callable only in the plugin page |
| wx.setBackgroundTextStyle | 2.4.0 | Callable only in the plugin page |
# 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 | 2.1.0 | Callable only in the plugin page |
| wx.navigateTo | 2.2.2 | Callable only in the plugin page |
| wx.redirectTo | 2.2.2 | Callable only in the plugin page |
| wx.switchTab | 2.3.1 | Callable only in the plugin page |
| wx.reLaunch | 2.3.1 | Callable only in the plugin page |
# animation
| API | Minimum version | Remarks |
|---|---|---|
| wx.createAnimation | 1.9.6 |
# position
| API | Minimum version | Remarks |
|---|---|---|
| wx.pageScrollTo | 2.1.0 | Callable only in the plugin page |
# 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 |
# Refresh the dropdown
| API | Minimum version | Remarks |
|---|---|---|
| wx.stopPullDownRefresh | 2.1.0 | Callable only in the plugin page |
| wx.startPullDownRefresh | 2.1.0 | Callable only in the plugin page |
# Current account information
| API | Minimum version | Remarks |
|---|---|---|
| wx.getAccountInfoSync | 2.2.2 |
# Forward
| API | Minimum version | Remarks |
|---|---|---|
| wx.hideShareMenu | 2.1.0 | Callable only in the plugin page |
| wx.getShareInfo | 2.1.0 | Callable only in the plugin page |
| wx.showShareMenu | 2.1.0 | Callable only in the plugin page |
| wx.updateShareMenu | 2.1.0 | Callable only in the plugin page |
# Live Logs
| 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 | 1.9.6 | See the note below |
# Login and obtain user information
This set of interfaces is limited to calls only after a user is authorized in the user information feature page. Otherwise fail will be returned.See User Information Function Page for details.
| API | Minimum version | Remarks |
|---|---|---|
| wx.login | 2.3.1 | |
| wx.getUserInfo | 2.3.1 |
# Bugs & Tips
- Wx.reportanalytics can be called normally, but is not currently performing statistical presentations.