Closed Dongjian413 closed 4 years ago
@Dongjian413 EasyPermissions is an opinionated API on top of the base Android permissions API. We believe that permissions should only be requested while the app is in the foreground, which is why we request an Activity
or a Fragment
.
The base system API only needs a Context
so if you want to request permissions in other flows you can use that:
https://developer.android.com/training/permissions/requesting
API is too limited, it has to pass activity or Fragment. Currently, it is impossible to request permissions in any View. In fact, I think permissions should not be associated with the interface, just a separate functional API