Skip to main content
Version: Next

General

Parameters

CallbackResult

Generic error results

PropertyTypeDescription
errMsgstringError message

BluetoothError

Bluetooth error

PropertyTypeDescription
errMsgstringError message
errCode0, 10000, 10001, 10002, 10003, 10004, 10005, 10006, 10007, 10008, 10009, 10012, 10013Error code

WifiError

WIFI error

PropertyTypeDescription
errMsgstringError message
errCode0, 12000, 12001, 12002, 12003, 12004, 12005, 12006, 12007, 12008, 12009, 12010, 12011, 12013Error code

NFCError

NFC error

PropertyTypeDescription
errMsgstringError message
errCode0, 13000, 13001, 13002, 13003, 13004, 13005, 13006Error code

IBeaconError

iBeacon error

PropertyTypeDescription
errMsgstringError message
errCode0, 11000, 11001, 11002, 11003, 11004, 11005, 11006Error code

SafeAreaResult

Safe area when in the positive direction of the vertical screen

PropertyTypeDescription
bottomnumberThe vertical coordinate of the lower right corner of the safe area.
heightnumberHeight of the safe area in logical pixels.
leftnumberThe horizontal coordinate of the upper left corner of the safe area.
rightnumberHorizontal coordinate of the lower right corner of the safe area.
topnumberVertical coordinates of the upper left corner of the safe area.
widthnumberWidth of the safe area in logical pixels.

AdErrCode

An error code is obtained by executing the binderror callback.

CodeExceptionCauseSolution
1000Call failed due to a backend errorThis error is not caused by developers.Ignore the error, and it will be automatically recovered after a period of time.
1001Parameter errorThe parameter is incorrectly used.For details, visit developers.weixin.qq.com. (There are different courses specific to Mini Programs and Mini Games. In the top tab, you can switch between the courses on the right of the Design column.)
1002Invalid ad unitThe spelling may be incorrect or the ad ID of another app may be used.Visit mp.weixin.qq.com to confirm the ad ID.
1003Internal errorThis error is not caused by developers.Ignore the error, and it will be automatically recovered after a period of time.
1004No suitable adThe ad does not appear every time. Maybe it is not appropriate to the user.This is a normal case. In addition, you need to improve compatibility in this case.
1005The ad component is being reviewed.Your ad is being reviewed and therefore cannot be displayed.Visit mp.weixin.qq.com to check the review status. In addition, you need to improve compatibility in this case.
1006The ad component is rejected.Your ad failed to pass the review and therefore cannot be displayed.Visit mp.weixin.qq.com to check the review status. In addition, you need to improve compatibility in this case.
1007The ad component is rejected.Your advertising capability is suspended. ads cannot be displayed during the suspension.Visit mp.weixin.qq.com to check the Mini Program ad suspension status.
1008The ad unit is disabled.The advertising capability in the advertising space is disabled.Visit mp.weixin.qq.com to enable the display in the advertising space.

BluetoothErrCode

Bluetooth error code

Error CodeError MessageDescription
0okNormal
10000not initThe Bluetooth adapter is not initialized
10001not availableThe current Bluetooth adapter is unavailable
10002no deviceThe specified device was not found
10003connection failConnection failed
10004no serviceThe specified service was not found
10005no characteristicThe specified characteristic was not found
10006no connectionThe current connection has disconnected
10007property not supportThe current characteristic does not support this operation
10008system errorAll other system errors
10009system not supportSystem versions under 4.3 do not support BLE (Android only).
10012operate time outConnection timeout
10013invalid_dataEmpty deviceId or invalid format

IBeaconErrCode

iBeacon error code

Error CodeError MessageDescription
0okNormal
11000unsupportThe system or device is not supported
11001bluetooth service unavailableThe Bluetooth service is not available
11002location service unavailableThe location service is not available
11003already startSearching has already started
11004not startBeaconDiscoverySearching has not already started
11005system errorAll other system errors
11006invalid dataIncorrect or invalid parameters

WifiErrCode

WIFI error code

Error CodeError MessageDescription
0okNormal
12000not initThe startWifi API should be called first
12001system not supportThe system does not support related capabilities
12002password error Wi-FiIncorrect password
12003connection timeoutConnection timeout
12004duplicate requestRepeated Wi-Fi connection
12005wifi not turned onWi-Fi switch is disabled (only for Android)
12006wifi not turned onGPS switch is disabled (only for Android)
12007user deniedAuthorization to connect to Wi-Fi was rejected by user
12008invalid SSIDInvalid SSID
12009system config errThe connection to the Wi-Fi network was rejected due to system operator configuration
12010system internal errorOther system errors. Specific error causes need to be printed in errmsg.
12011weapp in backgroundThe Wi-Fi network cannot be disconnected when the app runs in the background
12013wifi config may be expiredThe Wi-Fi configuration saved in the system expired. It is recommended to forget this Wi-Fi network and try again.

NFCErrCode

NFC error code

Error CodeError MessageDescription
0okNormal
13000The current device does not support NFC
13001The current device supports NFC, but the NFC switch is disabled in the system.
13002The current device supports NFC but does not support HCE.
13003Invalid parameter format in AID list
13004WeChat is not set as the default NFC payment app
13005Invalid return command
13006Failed to register AID

LaunchOptionsApp

启动参数

PropertyTypeDescription
pathstringThe path for Mini Program startup
queryRecord<string, any>The query parameter for Mini Program startup
referrerInfoReferrerInfoThe source information. This is returned when a user enters the Mini Program from another Mini Program, Official Account, or app. Otherwise, {} is returned. (see the Note below for details.)
scenenumberThe scene value for Mini Program startup
shareTicketstringThe shareTicket. See Obtaining More Forwarded Information for details.

ReferrerInfo

PropertyTypeDescription
appIdstringThe appId of the source Mini Program, Official Account, or app.
extraDataRecord<string, any>The data transfered from the source Mini Program, supported when scene=1037 or 1038.