I have an application, that has only a service (no UI at all). Other applications can use this service, but service requires permission to run.
Is it possible to request permission from one application for another (so application, that uses service, can request permission). Or the only way to support newest Android versions is to create a notification and activity with permission request like there
Asked
Active
Viewed 1,278 times
1
-
What kind of permissions are required by the service? – Mohammed Atif Nov 21 '16 at 11:33
-
1Create [transparent](http://stackoverflow.com/questions/2176922/how-to-create-transparent-activity-in-android) actvity, request permission there. Then wait with service work, until it is granted. Use ie. BroadcastReceivers for that. – R. Zagórski Nov 21 '16 at 11:40
1 Answers
2
One application cannot grant another permission. Permissions are given by application package.
One idea might be to create an Activity A (transparent as R. Zagórski mentioned) that calls your Service within. This activity could check and store your permissions.
Every other application that could want to use your service would just have to send a Broadcast defined by your application and it the service would work fine.
If you are working on a seriously low-level design, there are permission that could be granted by default on system level. Since it is not a common case, please tell me if this is the knowledge you're needing.
Best Regards

Tiago Dávila
- 346
- 1
- 7
-
1I have an application which is signature signed. Is this app can set permission grant state to other apps permissions? If so, How? – Akshay Kumar S Jul 01 '19 at 16:55
-