Open alexlarocca opened 4 months ago
Is this reproducible with Android 14?
I just tried to reproduce what you describe on Pixel 7 running Android 14, but I couldn't.
Steps:
I do not have an Android 14 device. But I just reproduced the issue on your sample app (https://github.com/50ButtonsEach/flic2lib-android-sample). Also this stopped to receive click event and failed to pairing like my app. I'm going to test this problem with the official app.
Even the official Flic app breaks like mine on Android 9. While it works properly on Android 13. Any chance to reproduce and fix this issue on Android 9? This my target since I'm going to create an app for Amazon Firestick and other Android TV BOX that use that Android version. And my app need to start a BLE peripheral too.
Have you reproduced this on any Android phone with version < 14? In that case, what phone models?
Reproduced on Xiaomi Mi MIx 2 (Android 9)
On Amazon Fire Stick (Android 9) it works perfectly. Even running a peripheral from the same app, it continues to receive click events and still able to pair new buttons.
So probably the issue is related to that specific phone (Xiaomi Mi Mix 2).
I created an app using this library and it works well. But as soon as I run a BLE Peripheral, indifferently from the same app or even an external app (for instance https://play.google.com/store/apps/details?id=com.cozyoz.bletool), my app continues to work well (receiving click events) for 30 seconds only, then it stops to work. Even an app restart does not help. I have to restart the device and then my app works again, until a BLE Peripheral starts.
I notice that the peripheral does not need to start advertising to create the problem. Just adding the BluetoothGattService is enough to break.
Another behavior I noticed. If I start the peripheral first, and only after the service is added, I start the Flic manager, I can see the following:
Tested on Android 9 and Android 13