I know there are two different types of location permissions
ACCESS_COURSE_LOCATION
ACCESS_FINE_LOCATION
I know that for using the location from Android M, we require runtime permission form the User. Now the issue is that both ACCESS_COURSE_LOCATION
and ACCESS_FINE_LOCATION
falls under the same bucket and which implies that granting one runtime permission will grant the other one without asking the user.
So, now my doubt is that if I just ask ACCESS_COURSE_LOCATION
permission and still can have the ACCESS_FINE_LOCATION
then why should I need to request ACCESS_FINE_LOCATION
? Can I just get a fine location with just ACCESS_COURSE_LOCATION
location permission?
Also, I am requesting a location fix with the below criteria
Criteria criteria = new Criteria();
criteria.setBearingAccuracy(Criteria.ACCURACY_MEDIUM);
criteria.setPowerRequirement(Criteria.POWER_MEDIUM);
riteria.setCostAllowed(false);
So how do the two different permissions affect the location fix I am getting with the above criteria?.
EDIT 1: Rephrasing the question. I know about the different providers like GPS, network, etc. and which permission they require. That's why my doubt is that if granting ACCESS_COURSE_LOCATION
can result in granting ACCESS_FINE_LOCATION
. Then can we have a situation during app lifecycle where we have only ACCESS_COURSE_LOCATION
granted? Also, how would the above criteria behave?
EDIT 2: Few other StackOverflow answers says that ACCESS_COURSE_LOCATION
can be eliminated when ACCESS_FINE_LOCATION
is granted. But if I just want a course location, I request permission and then I request location fix using the above criteria. So what should I expect a course location or a fine location? as granting course location is internally granting the fine location permission as well.