yayaa / LocationManager

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

Fallback provider option and alternative default provider #40

Closed sheddar closed 7 years ago

sheddar commented 7 years ago

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.

yayaa commented 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.

yayaa commented 7 years ago

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;