Skip to content

Instantly share code, notes, and snippets.

@victorbrndls
Created May 13, 2021 11:22
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 victorbrndls/354d70bbcc6054a46b8a245b403f4bf9 to your computer and use it in GitHub Desktop.
Save victorbrndls/354d70bbcc6054a46b8a245b403f4bf9 to your computer and use it in GitHub Desktop.
fun Context.hasPermissions(vararg permissions: String) = permissions.all { permission ->
ContextCompat.checkSelfPermission(this, permission) == PackageManager.PERMISSION_GRANTED
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment