Skip to content

Instantly share code, notes, and snippets.

@amsterdatech
Last active April 27, 2020 14:12
Show Gist options
  • Save amsterdatech/eb482da554f6e23c4cfc6a19f1cec6c1 to your computer and use it in GitHub Desktop.
Save amsterdatech/eb482da554f6e23c4cfc6a19f1cec6c1 to your computer and use it in GitHub Desktop.
sealed class AppPermission(
val permissionName: String, val requestCode: Int, val deniedMessageId: Int, val explanationMessageId: Int
) {
companion object {
val permissions: List<AppPermission> by lazy {
listOf(
ACCESS_FINE_LOCATION
)
}
}
object ACCESS_FINE_LOCATION : AppPermission(Manifest.permission.ACCESS_FINE_LOCATION, 42,
R.string.permission_required_text, R.string.permission_required_text
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment