if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)
!= PackageManager.PERMISSION_GRANTED) {
ActivityCompat.requestPermissions(this,
new String[]{Manifest.permission.ACCESS_FINE_LOCATION},
1);
permission= true; ;
}
}
in the above code “this” is not recognisable and show error
in the above code “this” is not recognisable and show error. so kindly suggest me to correct it.
APDJ NFR is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.