In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article will introduce in detail "how Mini Program enables the notify function when the eigenvalues of low-power Bluetooth devices change". The content steps are clear and detailed, and the details are handled properly, while the editor updates different knowledge points every day. I hope this article "Mini Program how to enable the notify function when the eigenvalues of low-power Bluetooth devices change" will give you unexpected gains. Please follow the editor's ideas slowly and deeply. The details are as follows, let's go to harvest new knowledge.
Enable the notify function when the eigenvalues of low-power Bluetooth devices change, and subscribe to eigenvalues. Note: the eigenvalue of the device must support notify or indicate before it can be successfully called. For more information, please see the properties attribute of characteristic.
In addition, notify must be enabled before you can listen to device characteristicValueChange events
OBJECT parameter description:
Parameter type required indicates that deviceIdString is a Bluetooth device id, reference device object serviceIdString is Bluetooth eigenvalue, corresponding service uuidcharacteristicIdString is Bluetooth eigenvalue, uuidstateBoolean is true: enable notify; false: deactivate notifysuccessFunction is successful, return local Bluetooth adapter status failFunction No API call failed callback function completeFunction No API call end callback function (both successful and failed call will be executed)
Success return parameters:
Parameter type description errMsgString success: ok, error: details
Sample code:
Wx.notifyBLECharacteristicValueChange ({state: true, / / enable notify feature / / the deviceId here needs to have established a link with the corresponding device through createBLEConnection deviceId: deviceId, / / the serviceId here needs to obtain serviceId: serviceId in the above getBLEDeviceServices interface, / / the characteristicId here needs to obtain characteristicId: characteristicId, success: function (res) {console.log ('notifyBLECharacteristicValueChange success') {console.log (' notifyBLECharacteristicValueChange success') in the above getBLEDeviceCharacteristics interface) Res.errMsg)}}) what does Mini Program mean? Mini Program is an application that can be used without download or installation. By scanning the QR code or searching it for immediate use, it is easy to operate and easy to spread, and can achieve seven functions such as message notification, offline code scanning, official account association and so on. It is based on Wechat, similar to APP. You can use it whenever you want. After using it, you will leave without taking up memory.
Thank you for reading this. I hope you have the most profound experience from the practical level on the key issue of "how Mini Program enables the notify function when the eigenvalues of low-power Bluetooth devices change". The specific usage also requires everyone to practice and use it before you can understand it. If you want to read more related articles, welcome to follow 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.