Last active
March 13, 2019 22:24
-
-
Save ralphpina/37cc411ba675fe281185ad1501958ca6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is the main API for the SDK. It provides methods to observe and request permissions. | |
*/ | |
interface PermissionsManager { | |
/** | |
* Observe the state of permissions. You will get notified when there's new changes to it. | |
*/ | |
fun observe(vararg permissions: Permission): Observable<List<PermissionResult>> | |
/** | |
* Request a permission from the system. The Single will return the permissions result from the OS. | |
*/ | |
fun request(vararg permissions: Permission): Single<List<PermissionResult>> | |
/** | |
* Navigate to your app's settings. Here the user can manually change permissions. | |
*/ | |
fun navigateToOsAppSettings() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment