Android Bluetooth socket freeze application

后端 未结 6 2381
南旧
南旧 2021-02-14 23:46

I have a strange issue with bluetooth socket. If I create socket and later close application, android device freeze with very hight CPU load.

Here my sample code:

<
6条回答
  •  终归单人心
    2021-02-14 23:59

    I am facing the same issue but in server mode when I used BluetoothServerSocket. I was using system.exit(0) to quit the application which I read somewhere this is not recommended. I removed the system.exit(0) call and I don't have the freeze issue. (But if I kill the app then it does exhibit the freeze).

    Does anybody has an issue in Server mode when sometimes the SDP record doesn't get deleted?

提交回复
热议问题