зачем все еще нужна проверка прав доступа, когда я использовал EasyPermissions?
@SuppressLint("MissingPermission")
@AfterPermissionGranted(100)
private fun methodRequiresTwoPermission() {
val perms = Manifest.permission.ACCESS_FINE_LOCATION
if (EasyPermissions.hasPermissions(this, perms)) {
Toast.makeText(applicationContext, "Granted", Toast.LENGTH_SHORT).show()
mMap.isMyLocationEnabled = true // Call requires permission. @SuppressLint("MissingPermission")
mMap.getUiSettings().setMyLocationButtonEnabled(true)
} else {
Toast.makeText(applicationContext, "Denied", Toast.LENGTH_SHORT).show()
EasyPermissions.requestPermissions(
this, "Please allow the permission",
100, perms
)
}
}