In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-21 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 get the Bluetooth module in Mini Program into effect. The content is easy to understand and clear. I hope it can help you solve your doubts. Now let the editor take you to study and learn the article "how to get the Bluetooth module in Mini Program to take effect".
Get all Bluetooth devices that have been discovered during the Mini Program Bluetooth module takes effect, including those that have been connected to the machine.
OBJECT parameter description:
Parameter type required indicates that successFunction returns the status of the native Bluetooth adapter if it is successful. FailFunction No API call failed callback function completeFunction No API call ended callback function (both successful and failed calls will be executed)
Success return parameters:
Parameter type indicates that the list of connected devices corresponding to devicesArrayuuid errMsgString succeeded: ok, error: details device object
Bluetooth device Information
Parameter type description nameString Bluetooth device name, some devices may not have deviceIdString to distinguish the signal strength of the device's idRSSINumber current Bluetooth device ManufacturerData segment in the broadcast segment of the current Bluetooth device (note: vConsole cannot print out ArrayBuffer type data) advertisServiceUUIDsArray ServiceUUIDs segment in the broadcast segment of the current Bluetooth device localNameString LocalName segment in the current Bluetooth device broadcast segment
Sample code:
/ / ArrayBuffer to 16 progress string example function ab2hex (buffer) {var hexArr = Array.prototype.map.call (new Uint8Array (buffer), function (bit) {return ('00' + bit.toString (16). Slice (- 2)}) return hexArr.join ('') } wx.getBluetoothDevices ({success: function (res) {console.log (res) if (res.devices [0])) {console.log (ab2hex (res.devices [0] .advertisData))}}) what is the advantage of Mini Program compared with developers, Mini Program is less difficult to develop, can save development and operating costs, and allows developers to 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 get the Bluetooth module to take effect in Mini Program". If this article is helpful and 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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.