Skip to content

Instantly share code, notes, and snippets.

@sagar-viradiya
Last active June 16, 2019 05:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sagar-viradiya/9ffea9ba6b14aaafa5595318a08709a9 to your computer and use it in GitHub Desktop.
Save sagar-viradiya/9ffea9ba6b14aaafa5595318a08709a9 to your computer and use it in GitHub Desktop.
/**
* A static factory method to request permission from activity.
*
* @param activity an instance of [AppCompatActivity]
* @param requestId Request ID for permission request
* @param permissions Permission(s) to request
*
* @return [PermissionResult]
*
* Suspends the coroutines until result is available.
*/
suspend fun requestPermissions(
activity: AppCompatActivity,
requestId: Int,
vararg permissions: String
): PermissionResult
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment