0

I know that if you set target sdk to 23 you now need to ask the users for "dangerous" permissions at runtime like was responded here: Android 6.0 Permission Error

But some permissions are listed as "normal" and they are required when the app is installed. Is it possible to somehow mark some of the "dangerous" requirements that we have in our manifest to act as "normal" (to require them on install and not at runtime) because without some of them the app cannot actually function properly. Just rewriting everything to ask permissions at runtime is not really an option at the moment, but we will probably do that in the future.

Community
  • 1
  • 1
Stals
  • 1,543
  • 4
  • 27
  • 52

2 Answers2

3

No. There is no way to do what u want. If you don't have the time to develop it now, you should target SDK 19 (permissions were introduced on Lollipop 21)

edit:

my bad, you should target API 22, as permissions were introduced on API 23. But still, target a lower API is the best option until you have time to properly develop the permission model.

Budius
  • 39,391
  • 16
  • 102
  • 144
  • I completely agree with Budius, and you should have rewritten your code a few months ago to adjust to the new permissions system. This is why Google launches the Developer Preview versions of Android. – tim687 Mar 26 '16 at 15:06
  • @tim687 i fully understand that, I just needed confirmation that this is not an option – Stals Mar 26 '16 at 15:08
  • @Budius It is completely wrong. The runtime permissions are introduced with API 23 (not 21). Also users can revoke permissions from any app at any time, even if the app targets 22 or lower. – Gabriele Mariotti Mar 26 '16 at 15:10
  • @GabrieleMariotti oh man, for sure I pointed the wrong SDK numbers (and I'll adjust my answer shortly). But I'm not wrong on the fact that if he doesn't have time to develop it now, his best option is to target below the permission until possible as the Runtime won't crash with revoked permission, but simply give empty results. – Budius Mar 26 '16 at 15:13
  • Target to 19 works..you can bypass Runtime permission. But you have to handle case, when the user goes to Settings and turn off the required permissions. – John Jul 22 '16 at 11:36
1

Is it possible to somehow mark some of the "dangerous" requirements that we have in our manifest to act as "normal" ?

No it is not possibile.
The only way to avoid managing the runtime permissions is to use target 22.
But pay attention.

The users can revoke permissions from any app at any time, even if the app targets a lower API level

Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
  • I see, didn't know about the ability to revoke permissions now, it actually would make the option I wanted useless anyway. – Stals Mar 26 '16 at 15:17