I am working on a video calling application, and I have an “incoming call” screen that alerts the user when someone calls them. This screen is an action initiated by an incoming GCM and has the value noHistory = "true" and showOnLockScreen = "true" set in the manifest so that the user can make calls without unlocking their device.
If the user wants to accept the call, I run another action to participate in the actual call. However, before I run the second action, I will check for the necessary permissions (camera, microphone, etc.) and ask them if not.
This is where the problems arise.
Problem 1:
The access request dialog displayed by the system forces my activity to go to onPause. I believe, because under the hood this dialogue is actually an activity.
As a new activity begins here, using noHistory = "true" means that our activity is instantly killed. Technically, this is intentional behavior, and indeed, the Android team rejected this problem like this:
https://code.google.com/p/android-developer-preview/issues/detail?id=2915
I can get around this problem by manually managing it in onPause and detecting if there are any outstanding permission requests in flight, etc.
Problem 2:
After working on problem 1, I get to stage 2.
, , .
, , , . .
: https://youtu.be/cobINQ9e2GY
, showOnLockScreen, true, , , .
, , "", ?
, . / .
, 2:
Activity, , ?