Android approach to launch an emergency Activity from background without user interaction

15 hours ago 1
ARTICLE AD BOX

I'm working on a WearOS app for Samsung watches that handles VoIP calls. The app needs to manage incoming and outgoing emergency calls (like SOS) directly on the watch. These calls need to work reliably even if the device is in Doze mode (Light, Deep), Suspend, or the screen is off, since the user might be unconscious and can't tap a notification.

I need to launch an Activity immediately in response to an emergency event (SOS calls), regardless of the device state (Light Doze, Deep Doze, Suspend). Android should:

Wake up the device

Turn on the display

Show the call UI

Android normally restricts background Activity launches (BAL) and usually requires some form of user interaction—like an intent from a foreground app or the user tapping a notification. That doesn't work for emergencies, because the user could be unconscious.

I used deprecated Wake Lock features (SCREEN_BRIGHT_WAKE_LOCK, ACQUIRE_CAUSES_WAKEUP, ON_AFTER_RELEASE) to wake the device, then sent a Full-Screen Intent to open the Activity, using FLAG_KEEP_SCREEN_ON to keep the screen on. This works but relies on deprecated APIs and @SuppressLint directives. Right now, I'm planning to run a Foreground Service and use a PARTIAL_WAKE_LOCK to keep the app running and prevent the device from going into Suspend and raise the process priority, but it doesn't fix the problem of launching the Activity to show the call UI immediately.

Is there a generic, reliable, modern and recommended Android approach to launch an emergency Activity immediately from the background, without relying on deprecated Wake Locks or user interaction? I can hardly believe that Android doesn't cover similar cases.

Thank you very much for any insights or guidance!

Read Entire Article