Currently I am working on an utility app which does not have any user interface.This is a system application which will be installed along with other android packages. I am running a service which will stop once done with its assigned tasks.Some tasks require some critical permissions like send sms, write something to external storage etc. To check for permissions in marshmallow Activity is needed.I don't want to interact with user.I don't to use even transparent activity. Is system app require uses permissions in marshmallow ? Is there any api which help me to grant permission without any user interaction ?
Asked
Active
Viewed 782 times
1
-
As i know with out user interaction no chance of grant permission. – Android Surya Jul 26 '16 at 12:55
-
@user3143487 I am also implementing an app like you. How did you solve this problem, please share your solution? BTW I have to keep the targetsdkversion as 23. – Noundla Sandeep Mar 01 '17 at 16:17
2 Answers
7
You can build your app with targetSdkVersion=22 and compileSdkVersion=24 (to support marshmallow devices) in order to avoid handling user permissions.

DoronK
- 4,837
- 2
- 32
- 37
1
Even if it is a system app, you should handle user permission gracefully. This is normal way of handling it. Also, there is another way of doing it, you can use the android:sharedUserId property in the manifest. you can share the userID of the application which has already granted permission's which your application need.
A word of caution here, whichever app you choose, you need their signature in order to install the application.
Read more about android:sharedUserId

Arpit
- 1,259
- 11
- 21