Get Location Permissions from User in Android Application [duplicate]
This question already has an answer here: How to request Location Permission at runtime 5 answers I´m trying to get the users actual location with the typicaly permissions box: like this: If anyone knows how to make it , pleas answer. Ask for permission at runtime to use device current location as below : if (ActivityCompat.checkSelfPermission(YourActivity.this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(YourActivity.this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) { ActivityCompat