where is declared the constante Priority.PRIORITY_BALANCED_POWER_ACCURACY?

64 views Asked by At

When I read the doc : https://developers.google.com/android/reference/com/google/android/gms/location/LocationRequest then say that PRIORITY_BALANCED_POWER_ACCURACY is deprecated and that we must use instead Priority.PRIORITY_BALANCED_POWER_ACCURACY. but when i do so i receive :

error: cannot find symbol
.setPriority(Priority.PRIORITY_BALANCED_POWER_ACCURACY)

What did I miss ?

1

There are 1 answers

0
Krokomot On BEST ANSWER

Also LocationRequest.setPriority() has become deprecated and been replaced by LocationRequest.Builder.setPriority() where

The default value is Priority.PRIORITY_BALANCED_POWER_ACCURACY.

So in your case you don't need to call setPriority() at all.

Further note, that PRIORITY_BALANCED_POWER_ACCURACY has been moved from class LocationRequest to interface Priority.