Android RuntimePermission, example of Dangerous Permissions and Special Permissions
In my practical experience, I think it is better to use common activity to request permission,
advantage of this design pattern :
- No need to add RuntimePermission code in every activity or fragment.
- If RuntimePermission code need to edit later, just edit common activity.
- Avoiding bugs with nested fragment(ex: Issue 189121).
Dangerous Permissions(Ex: in activity or fragment) and Special Permissions(Ex: setRingtone)
show UI with rationale of requesting this permission
once user deny permission, next time will see "Nerver ask again"
open your app setting when user chose "Nerver ask again"
use common activity to request permission
HTC One A9, Android 6.0
HTC One X, Android 4.2.2
http://inthecheesefactory.com/blog/things-you-need-to-know-about-android-m-permission-developer-edition/en
http://stackoverflow.com/questions/30719047/android-m-check-runtime-permission-how-to-determine-if-the-user-checked-nev
https://developer.android.com/training/permissions/index.html
https://developer.android.com/guide/topics/security/permissions.html#normal-dangerous