I want my Android app to recieve nearby messages when screen is off. Ideally also when app is not in foreground.
Is this possible? Which strategy do I use?
I want my Android app to recieve nearby messages when screen is off. Ideally also when app is not in foreground.
Is this possible? Which strategy do I use?
Subscribe in the background
When your app subscribes to beacon messages in the background, low-power scans are triggered at screen-on events, even when your app is not currently active. You can use these scan notifications to "wake up" your app in response to a particular message. Background subscriptions consumes less power than foreground subscriptions, but have higher latency and lower reliability.