-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
I was working with permissionskt sinceone year and know the lint give a false postive when accessing the location.
askPermissions(
Manifest.permission.ACCESS_FINE_LOCATION,
Manifest.permission.ACCESS_COARSE_LOCATION
) {
onGranted {
val fusedLocationClient =
LocationServices.getFusedLocationProviderClient(this@HomeActivity)
fusedLocationClient.lastLocation.addOnSuccessListener { location: Location? ->
if (location != null) {
} else {
showSnackBar("No location")
}
}
}
}fusedLocationClient.lastLocation is completely red because android studio tell you to asking for permissions.
For the moment i have added @SuppressLint("MissingPermission") on my function.
Metadata
Metadata
Assignees
Labels
No labels