BLE read and write don't work in APK, but work perfectly in live preview

Hi folks,

my BLE app works just perfectly with the live preview on my Android 12 device A53, and mostly works from the APK. my app reads 5 Characteristics and Writes to 2 Characteristics one of the Characteristics is both read able and writeable (settings). Everything works perfectly in live preview in APK the single read and write Characteristic displays an error: something like operation was rejected (will verify tomorrow) My question is where do I go from here? how can I dive deeper into debugging the APK, what next steps can I take?

So I’ll reply to my own questions: not sure what happened but I was storing characteristic id’s in an app variable and then in the BLE read and write I was assigning them from the app variables. I have no idea why it didn’t work for just one characteristic. But I ended up removing all characteristic id’s from app variables and just using the hardcoded text. deleted all unused app variables too, Did a re-download of APk and all was well.

Would love to know what was going on under the covers

1 Like