java - android 6.0 以上版本或者小米手机,如果要在application中需要写权限如何申请?
PHPz
PHPz 2017-04-18 10:40:56
0
3
350
PHPz
PHPz

学习是最好的投资!

reply all(3)
Peter_Zhu

Refactor the code and put the business into Activity
I didn’t look at the permission application code, but from the effect it is a Dialog. This requires an Activity to host it. Even if you don’t put the permission application code into Activity, You can only start a new Activity implementation.

PHPzhong

Dynamic code application cannot be processed in Application. You need to apply at the exact location where you need to use it. It can be an activity or a Fragment. If the user refuses to provide permission, you can process it independently as needed and just do it in Application. Can't handle it anymore.

PHPzhong

Runtime permissions have been added after Android 6.0. For the adaptation plan, we recommend that you refer to the official demo: https://github.com/googlesamp...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template