Last active
June 12, 2019 17:03
-
-
Save sagar-viradiya/1a9df6b97dc52ffbbe7ed18816a8fcb2 to your computer and use it in GitHub Desktop.
This file contains 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
/** | |
* A static method to request permission from activity. | |
* Your activity must implement [PermissionObserver] | |
* | |
* @param activity an instance of [AppCompatActivity] which is also [PermissionObserver] | |
* @param requestId Request ID for permission request | |
* @param permissions Permission(s) to request | |
* | |
* @throws [IllegalArgumentException] if your activity doesn't implement [PermissionObserver] | |
*/ | |
@JvmStatic | |
fun requestPermissions( | |
activity: AppCompatActivity, | |
requestId: Int, | |
vararg permissions: String | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment