1

I am developing a BLE app that connects to custom hardware. The hardware supports notifications on as many characteristics as needed. However android only allows me to enable notifications on 15 characteristics. The only resource I found suggested using multiple GATT objects to work around that limit. However that seemed hacky and not an officially supported method of doing things. Can anyone recommend the best way forward?

Am I wrong about this being a Jerry-rigged solution? Could there be any negative implications to doing it this way? In the future could it be possible for android to change how they do things breaking my implementation for me and all my users?

1 Answers1

0

If there is a hard limit, you can't do anything about that particular limit. You need to use workarounds. "Official" supported methods in Android is not something you can get away with normally when you find issues. According to the documentation, this problem shouldn't exist at all.

Using multiple BluetoothGatt objects is probably a very good workaround. I have hard to see why they should change anything that would break this. What can be problematic however is how to program the code so it becomes bug-free since you now have two asynchronous objects...

But another question is why you have so many characteristics? Can you lower the amount?

Emil
  • 16,784
  • 2
  • 41
  • 52