I have some code where a service starts the Google Play Services Location/Activity, when the Activity intent is called, I want to change the setPriority
for the Location service.
// Location
mLocationRequest = LocationRequest.create();
if (mostProbActName.equals("still")) {
mLocationRequest.setPriority(LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY);
Log.i(TAG, "GOING TO BALANCED MODE!");
} else {
mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
Log.i(TAG, "GOING TO HIGH MODE!");
}
I put the following in the onHandleIntent
section, but it doesn't seem that it is changing its behavior. Is there a better way to implement this?