This isn't a question, just an observation that might save someone the days of stress that I've just had.
Symptom is an app that reads a BLE sensor, works great during development using B4A Bridge, solid as a rock. Then I recompile it with logging disabled (and now even comment out all Log[Color] calls), install the ready-for-release version using B4A Bridge again, test it, still works great.
Then I upload it to Google Play, download it, test it, and it is no longer solid as a rock, and certainly not saleable. Spewin!
I eventually found that the app runs fine if B4A Bridge is up and active, fails otherwise.
After some more experimenting, I've found that if I continuously ping the Android device over WiFi from another computer, then the app runs fine without B4A Bridge running too.
My theory is that the power management on this device must be over-enthusiastically powering down the Bluetooth receiver, and that keeping the WiFi active stops this and leaves the Bluetooth receiver on, and thus I no longer miss packets that are sent sporadically by the Bluetooth sensor (ie as Notifications).
The device is a cheap generic Android tablet, ie not a phone. The five phones I have for testing all seem to work ok.
I will have to follow this up further, but I am under the pump right now to port this app to iOS, so it'll be a couple of weeks before I get back to this issue.
If anybody else has experienced similar, or has discovered other causes for BLE operation varying with/without B4A Bridge etc, I'd be interested to hear about it.
Symptom is an app that reads a BLE sensor, works great during development using B4A Bridge, solid as a rock. Then I recompile it with logging disabled (and now even comment out all Log[Color] calls), install the ready-for-release version using B4A Bridge again, test it, still works great.
Then I upload it to Google Play, download it, test it, and it is no longer solid as a rock, and certainly not saleable. Spewin!
I eventually found that the app runs fine if B4A Bridge is up and active, fails otherwise.
After some more experimenting, I've found that if I continuously ping the Android device over WiFi from another computer, then the app runs fine without B4A Bridge running too.
My theory is that the power management on this device must be over-enthusiastically powering down the Bluetooth receiver, and that keeping the WiFi active stops this and leaves the Bluetooth receiver on, and thus I no longer miss packets that are sent sporadically by the Bluetooth sensor (ie as Notifications).
The device is a cheap generic Android tablet, ie not a phone. The five phones I have for testing all seem to work ok.
I will have to follow this up further, but I am under the pump right now to port this app to iOS, so it'll be a couple of weeks before I get back to this issue.
If anybody else has experienced similar, or has discovered other causes for BLE operation varying with/without B4A Bridge etc, I'd be interested to hear about it.
Last edited: