In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly shows you how to search nearby iBeacon devices in WeChat Mini Programs. The content is simple and clear. I hope it can help you solve your doubts. Let's take you to study and learn this article "how to search nearby iBeacon devices in WeChat Mini Programs".
Wx.startBeaconDiscovery (OBJECT)
Start searching for nearby iBeacon devices
OBJECT parameter description:
The parameter name type is required to indicate that uuidsStringArray is the uuidssuccessFunction No API broadcast by iBeacon device. Successful callback function failFunction No API call failed callback function completeFunction No API call end callback function (both successful and failed calls will be executed)
Success return parameter description:
The parameter name type describes the result of the errMsgString call
Sample code:
Wx.startBeaconDiscovery ({success (res) {}}) wx.stopBeaconDiscovery (OBJECT)
The basic library 1.2.0 is supported, and the lower version needs to be compatible.
Stop searching for nearby iBeacon devices
OBJECT parameter description:
The parameter name type is required to indicate whether successFunction API calls successful callback function failFunction No API call failed callback function completeFunction No API call ends callback function (both successful and failed calls will be executed)
Success return parameter description:
Parameter name type description errMsgString call result wx.getBeacons (OBJECT)
The basic library 1.2.0 is supported, and the lower version needs to be compatible.
Get all searched iBeacon devices
OBJECT parameter description:
The parameter name type is required to indicate whether successFunction API calls successful callback function failFunction No API call failed callback function completeFunction No API call ends callback function (both successful and failed calls will be executed)
Success return parameter description:
The parameter name type describes the result of the beaconsObjectArrayiBeacon device list errMsgString call
IBeacon structure:
Parameter type description uuidStringiBeacon device broadcast the secondary idproximityNumber of the primary idminorStringiBeacon device of the idminorStringiBeacon device represents the device distance the distance of the accuracyNumberiBeacon device rssiNumber represents the signal strength of the device wx.onBeaconUpdate (CALLBACK)
The basic library 1.2.0 is supported, and the lower version needs to be compatible.
Listen for update events on iBeacon devices
CALLBACK return parameter description:
The parameter name type describes the list of all iBeacon devices currently searched by beaconsarray object
IBeacon structure:
Parameter type description uuidStringiBeacon device broadcast the secondary idproximityNumber of the primary idminorStringiBeacon device of the idminorStringiBeacon device represents the device distance the distance of the accuracyNumberiBeacon device rssiNumber represents the signal strength of the device wx.onBeaconServiceChange (CALLBACK)
The basic library 1.2.0 is supported, and the lower version needs to be compatible.
Listen for state changes of iBeacon services
CALLBACK return parameter description:
Parameter name type indicates whether availableBoolean service is currently available discoveringBoolean is currently in search status error code list error code remark 0ok normal 11000unsupport system or device does not support 11001bluetooth service unavailable Bluetooth service unavailable 11002location service unavailable location service unavailable 11003already start has started searching Mini Program what is the advantage of Mini Program compared with developers, it is less difficult to develop and can save development and operating costs So that developers can quickly develop a Mini Program. And Mini Program can be easily obtained and spread in Wechat, which can meet the basic life applications, in line with life services offline stores and non-rigid needs of low-frequency applications. For users, it can save time cost and mobile phone memory space, and have excellent use experience at the same time.
The above is about "how to search nearby iBeacon devices in WeChat Mini Programs". If this article is helpful to you and think it is well written, please share it with your friends to learn new knowledge. if you want to know more about it, please pay more attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.