yayaa / LocationManager

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

Update DefaultLocationProvider.java #37

Closed sheddar closed 7 years ago

sheddar commented 7 years ago

Handle situation when user decide to activate location through status bar while the gps dialog is displayed. Gps provider is checked in every scenario to prevent application from performing unnecessary actions.

yayaa commented 7 years ago

1- You are violating separation of concerns by adding SourceListener to DispatcherLocationProvider and sending GooglePlayServices information back. That shouldn't know about those stuff, nor care. 2- Getting GPS enabled actually not something that you'd get response as immediately, it might working on your device, but i'd suggest you to test on more devices or maybe even emulator just to see down sides.

Not that i don't wanna do this, but it's quite not easy :) There is also this issue asking for same thing, but even though i tried a few stuff couldn't get a really working solution.

With 1 point above, i cannot accept this PR for sure, please take a look at that part again, and remove or modify somehow.