1

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 ?

user3143487
  • 235
  • 3
  • 7

2 Answers2

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