What can an android listen to while sleeping?
I cannot find a list of events that can be listened to while the device is sleeping.
For example, you can use a LocationListener while sleeping .
My goal is to detect when the user is in their car with at least one of the following methods, which will then wake up the phone:
- NFC tag on car dock
- Bluetooth car radio in range
But otherwise I am open to ideas.
thank
+3
source to share
2 answers
You need to create a Broadcast Receiver and register specific actions.
Example for boot detection: Android start a service at boot time .
0
source to share
The best idea so far is to wake up the phone using this link:
Android - wake up periodically from standby?
As documentation , I could wake up the phone and just use the CPU without turning off the screen.
But there may be disadvantages, perhaps there is a better way.
0
source to share