When using method
Is still an error
CodePudding user response:
You need to add authentication ContextCompat checkSelfPermissionCodePudding user response:
What is the method?CodePudding user response:
If (ActivityCompat. CheckSelfPermission (this,The Manifest. Permission. ACCESS_FINE_LOCATION)==PackageManager. PERMISSION_GRANTED | |
ActivityCompat. CheckSelfPermission (this, the Manifest. Permission. ACCESS_COARSE_LOCATION)==PackageManager. PERMISSION_GRANTED) {
LocationManager. RequestLocationUpdates (provider, 1000, 0, locationListener);//2000,
}
Add authentication, the other requires dynamic application permissions
CodePudding user response:
Dangerous permissions to dynamic applicationsCodePudding user response:
You need to add dynamic permissions: Manifest. Permission. ACCESS_FINE_LOCATION