3

I have updated my device few days ago. Its an lollipop upgrade, but still it started asking permissions for my app at run time.

I have targetSDK 21

But when I open app it pops up for gps permission and if user denied it, it stops working. I also used checkSelfPermission but it is retuning Granted(0) every time even user denied it. My current android version of Phone is android 5.1.1

Device having android 5.1.1 but its OS is customised by MI like samsung phones. So after upgrade it started asking permission for resource like GPS, Contact and other. Its android sdk version is android 5.1.1 not Android 6.0 which have Runtime Permissions.

3 Answers3

0

change the sdk version under gradlebuild minSdkVersion 20 check from here https://developer.android.com/about/versions/android-5.0.html

0

You require to implement runtime permission check for Android-21 plus device. Check the solution over here. You will find how array has been utilized in that, mostly that is were user stucks.

Additionally, if denied then you cannot force user to use that functionality. In short you need to bypass that module.

Community
  • 1
  • 1
Jimit Patel
  • 4,265
  • 2
  • 34
  • 58
  • My android device android 5.1.1. Still it is asking for permission at runtime. The code provide in the link is for Android 6.0 and above. – Vindhya Pratap Singh Jul 19 '16 at 08:47
  • then apply check... whether check is required or not at runtime. `if (Build.VERSION.SDK_INT > Build.VERSION_CODES.LOLLIPOP_MR1) {}` – Jimit Patel Jul 19 '16 at 08:49
0

Lollipop have no runtime permission mechanism.

Runtime Premission came up with Android M.

Fndroid
  • 465
  • 5
  • 9