天蓬老师2017-04-18 10:42:56
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.
PHPz2017-04-18 10:42:56
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.
PHPz2017-04-18 10:42:56
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...