简体   繁体   中英

how to generate alert in android java when connection is lost with remote bluetooth device

I need alert for device paired to android phone in case when it gets out of range from phone Bluetooth. I worked on it and got something about rss can any one help me out. do i need to send any character to check connection.

If you have the connection then you are probably blocking on the read() of the InputStream which will throw an IOException when the connection drops. Catch that and handle correctly.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM