yayaa / LocationManager

Simplify getting user's location for Android
806 stars 187 forks source link

Prioritize GPS providers #63

Closed miladrasooli closed 7 years ago

miladrasooli commented 7 years ago

Hi, First of all thanks for this great library, I was wondering if there is a way to prioritize gps providers , for example I want to first use GPS and try to retrieve an accurate position with a 30 seconds timeout and only if it failed use Google Play services and then the network provider. If the answer is Yes how can I find out which provider has given me the location? Thanks

yayaa commented 7 years ago

Hey @miladrasooli , Unfortunately that is not configurable for now, it is in the same order as best practices given by Google. First it tries with GooglePlayServices Api to get it (if you set the configuration, of course) and if it fails fallbacks to Default LocationProviders which are GPS and Network.