7

I am facing problem in Oppo mobile - Lollipop version. I need write contact permission in my app. but in oppo lollipop it ask oppo's own security permission. If I deny that permission than application crashed on open that screen. So I want to know how to check this permission in Oppo Lollipop version. In another device and All OS it works fine But I am facing problem in OPPO Lollipop version.

This thing happen if we turn on the security permission On if we make it off than it will work. I want to ask permission programmatically only not from going in setting

Cœur
  • 37,241
  • 25
  • 195
  • 267
Maulik Patel
  • 717
  • 1
  • 10
  • 22
  • simply where you ask permission and onRequestPermission make handle like if , then when user deny your permission handle code execute – Erfan Mar 15 '18 at 06:32
  • I know that very well. It works for every other devices but I have problem with specific Oppo Lollipop version only. In other devices it works fine. – Maulik Patel Mar 15 '18 at 06:34
  • Which kind of permission is it asking in Lollipop? Can you share some screenshots? – Mohit Rajput Mar 16 '18 at 10:26
  • Do you know the permission name (identifier, not label) that OPPO asks for? – Nick Cardoso Mar 21 '18 at 11:30

2 Answers2

0

As @erfan had mentioned, you hardly can do anything, since dynamically asking permission is supported only for Marshmallow and above. On Lolipop and below, asking permission will immediately result "PERMISSION_GRANTED" by default, whether or not the permission is actually granted. (Not sure if there's any exception for other devices, though)

I think the best you can do is to catch the exception and pop up an explanation to the user. Then when the user click ok, you can redirect him to app setting. Refer to here : How to open application permission window in app settings programmatically

Mycotina
  • 369
  • 3
  • 11
-1
  • If user just simply deny permission you can ask for same permission again, by again calling ask permission method.

OR

  • If user has selected never ask again and deny, then you need to intent user to you app permission setting screen.

Thank you.

Sagar
  • 554
  • 5
  • 21