I'm developing an app that has to connect to a Bluetooth module like this: http://www.microchip.com/wwwproducts/en/RN42
This Bluetooth module is located on an electronic board.
My app is able to connect with the chip and it communicates correctly (send and receive data).
But, I have a doubt. In some cases, it seems that my app loses the communication with the chip, and so I thought: maybe I'm wrong the method of connection between app and chip.
I follow the guide here: https://developer.android.com/guide/topics/connectivity/bluetooth.html and my app works like client, so the code is the code of "Connecting as a client" section of the page. I also use, like UUID, "00001101-0000-1000-8000-00805F9B34FB".
The question is: the connection method is correct? The UUID is correct?
Thanks!
You could use a BroadcastReceiver to check if your phone is really disconnecting sometimes. Here is an example .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.