2

After further research, i found that requestPermission only works on Android M. If i just include the permissions i needed in android manifest file, how does android ask user for the permission granted? For example, access fine location permission. I try including the requestPermission but never see the dialog.

veeyikpong
  • 829
  • 8
  • 20
  • Please provide your code.If you have grant,the dialog will not show.If your targetSdk is less than 23,the dialog will never show. – tiny sunlight Mar 17 '16 at 01:20

1 Answers1

7

Before Marshmallow, all the permissions are granted at installation time. That's why you don't see a dialog requesting permission on Lollipop and previous versions on runtime.

Check this out: Runtime Permissions. It only applies to Marshmallow and above.

Natan
  • 1,867
  • 13
  • 24