Android app not receiving some events

Hi,

I’m using latest android app from F-Droid. I’m not running google apps or play store.

Using gadgetbridge smart watch companion, and was using integration with OH where gadgetbridge is configured to send broadcasts on FellAsleep and WokeUp events.

OH stopped updating the item with those events at some point.

There is a disclaimer that event monitor needs to be enabled for this feature.

There were some mentions that this was removed from google play version, but should work in F-Droid…

Just checking where are we with this feature, is it supposed to work today, before I waste any more time investigating it?

It was removed from the F-Droid version as well die to increasingly tight restrictions in newer Android versions. See this PR.

thanks for info. bummer…

so I guess the options of Gadgedbridge should be removed altogether from the OH client settings, not to confuse people with features that are decommissioned…

for future reference, if anyone comes across this, I came up with alternate solution of sending those events via mqtt over to openhab.

https://github.com/pixento/broadcast-to-mqtt
A small and old app that does exactly one task - catches broadcasts and sends them to mqtt broker.
Configured and tested, works as expected.

note: the app is old and no longer available on playstore. got it off apkmirror

The integration will be removed. I missed that when I removed the event listener. It wasn’t possible to port that to the latest Android version due to new restrictions by Google.

just out of curiosity, as I am not a developer so I have no clue what’s under the hood of android, how are you catching android alarms then? aren’t those also broadcasted events?

Yes, they are, but unlike stated in the developer docs, that broadcast is also sent to manifest-declared receivers: 1, 2 (for the docs to be true, the FLAG_RECEIVER_REGISTERED_ONLY flag would have to be added when creating the intent).

So, in theory, we could ask gadgetbridge devs to change their broadcast so it’s also sent to manifest-declared receivers? Rather then giving up on this integration?