Android BluetoothGatt - status 133 - register callback

前端 未结 6 698
庸人自扰
庸人自扰 2021-01-30 08:56

First of all I read SOLVED: GATT callback fails to register and took the steps suggested in that post to solve this issue with no success. The recommended fix in there if you ha

6条回答
  •  鱼传尺愫
    2021-01-30 09:29

    Alright I have figured it out. The issue was mainly an oversight of when I was reading through the BluetoothGatt documentation. I was calling .disconnect(), but not .close(). Since the Galaxy s4 can only handle 6 connections at a time, my service was only running 6 times. Adding the .close() to my code allowed it to properly shut down the connection and freed up those used connections.

    Source that made me re-read the docs more carefully!

    So remember to use .close() on your BluetoothGatt object if you have a recurring connection to the same device(s)!!

提交回复
热议问题