0

Possible Duplicate:
Is there any way to ask permission programmatically?

as my app requires the permission
<uses-permission android:name="android.permission.CALL_PHONE" />
most of my users aren't happy cause on installation there's a text "paid services" (or sth) because in my app I have to make calls.

Afaik there IS a solution to NOT write permissions in the manifest, but ask for them as they are used.

How can I achieve this?

Community
  • 1
  • 1
Thkru
  • 4,218
  • 2
  • 18
  • 37
  • 1
    Surely you just need to explain in the description of the app why you have that permission requirement. – cjk May 18 '12 at 11:28
  • @rawkode: u were the first one, so if you want the kudos just make a post with that link instead of a comment ;) ... – Thkru May 18 '12 at 11:29
  • With the latest version of an Android, i.e. Android M the Runtime App Permissions are supported. Too late, but it is there now. – codebased May 29 '15 at 06:51
  • Now it is possible to get the permission from user dynamically – Naveed Ahmad May 19 '16 at 05:49

2 Answers2

4

You cannot change permissions of existing app, but you may create two different apps, one with CALL_PHONE permission, and another one without it. And let the people decide which one they want to install.

lenik
  • 23,228
  • 4
  • 34
  • 43
4

Although I'm one of the developers who would like to see some hybrid permission system in place, there is no solution as of today, at least according to the docs.

Android has no mechanism for granting permissions dynamically (at run-time) because it complicates the user experience to the detriment of security.

Source

Juan Cortés
  • 20,634
  • 8
  • 68
  • 91