Can Android Companion Device Pairing wake up the Companion App from background upon Bluetooth Connection

Viewed 924

I want my app to be woken up when the device finds a specified bluetooth device. The problem is, that after android O you can't register a broadcast receiver anymore to handle that in the background. Having a constant foreground service is also no option for me. Android Auto does this behaviour already I am trying to implement myself.

I found this: https://developer.android.com/guide/topics/connectivity/companion-device-pairing It says

After the device is paired, the device can leverage the REQUEST_COMPANION_RUN_IN_BACKGROUND and REQUEST_COMPANION_USE_DATA_IN_BACKGROUND permissions to start the app from the background.

Sadly i cant seem to find how this is used and if this even provides what im looking for. I am happy for all suggestions and hints.

0 Answers
Related