When revoking a permission (e.g: Locations) from an App in Android Marshmallow, the app process is terminated. Is there any way to handle this for UI tests that wants to test different cases (permissions enabled/disabled)? Attempting to use UIAutomator to set the permissions in App Setting results in a crash since the app terminates right after permission is revoked. Appreciate any insight/comments!
Asked
Active
Viewed 185 times
4

Floern
- 33,559
- 24
- 104
- 119

infinitel8p
- 41
- 1
-
Why on earth can Android not issue a callback to allow the app to stop the location process. background app termination can be a real pain for some apps, especially as the user will not know that the app has terminated. – Steve Brooker Apr 01 '18 at 21:24