Skip to content

Instantly share code, notes, and snippets.

@vferreirati
Created March 4, 2024 11:44
Show Gist options
  • Save vferreirati/9998879fadafc11ede50e28be9d3a137 to your computer and use it in GitHub Desktop.
Save vferreirati/9998879fadafc11ede50e28be9d3a137 to your computer and use it in GitHub Desktop.
Permissions
private fun checkLocationPermission() {
TedPermission.create()
.setPermissionListener(object : PermissionListener {
override fun onPermissionDenied(deniedPermissions: MutableList<String>?) {}
override fun onPermissionGranted() {
viewModel.onAction(ScreenActions.OnLocationPermissionGranted)
}
})
// ACCESS_FINE_LOCATION is being used due to the yuno SDK
.setPermissions(
Manifest.permission.ACCESS_FINE_LOCATION,
Manifest.permission.ACCESS_COARSE_LOCATION
)
.check()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment