Android Bluetooth Notification
I am developing an Bluetooth application in android.Once connection is made between two devices i am sending data between t开发者_Go百科wo devices. My problem is whenever either of the devices Bluetooth is turned off i want that to be notified to other device and want to print a toast message stating that "Other device Bluetooth is turned off".How to do this?
Thanks
You can monitor the bluetooth connection (listening to Broadcast action : ACTION_ACL_DISCONNECTED) and notify that the connection has gone. Dropping of connection does not necessarily mean it is powered off , but it is surely a side-effect.
The following link can be useful to you
- notification if the Bluetooth is turned off in android app
精彩评论