Closed sheddar closed 7 years ago
@kobasek again there are multiple stuff in this PR, please create separate PRs for different concerns.
1- Fallback from GooglePlayServicesProvider to DefaultLocationProvider - (this one i really want to implement, so i am tend to accept but cannot accept with current version.)
2- Custom LocationProvider. This should not be a part of library, but a good example how to create and use custom LocationProvider. You can set AlternativeDefaultLocationProvider
directly to LocationManager.Builder
as locationProvider(new AlternativeDefaultLocationProvider(...))
and it will be used as you expected. You don't need to implement this to library.
Since this PR took too long, i accept some of your points as issue report and wanted them to be fixed. Here are the implementations for;
And for Alternative
location provider, as i said, It is not a part of the library but it's a good sample for custom implementation.
Default provided can be used as a fallback provider when Google Api Client's Connection has failed or suspended.
Alternative default provider uses both location providers - gps and network at the same time, filtering upcoming location updates by location accuracy, location source(gps is prioritized) and time period.