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.
Asked
Active
Viewed 4,589 times
2
-
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 Answers
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