delight-im / Android-SimpleLocation

Utility class for easy access to the device location on Android
Apache License 2.0
200 stars 75 forks source link

When I am not connected to Internet , this library provide me past location #17

Closed sandeep551 closed 7 years ago

sandeep551 commented 7 years ago

Hello All,

Your library is very good but in this I have found one issue and if possible please fix it as soon as possible .

Problem Statement : when I am connected to internet , it give me right location but when I am not offline (i.e not connected to Internet) then this library return me some past location which is random .

Please follow the steps to re-generate the issue :

1.) Connect to internet from one location and get lat & long 2.) Now Disconnect your internet from same position , now you will get some past location i.e lat & long .

So please check it and let me know , if you get some thing .

Thanks

ocram commented 7 years ago

Thanks for your feedback!

Do you have GPS enabled on your device? Otherwise, the network location would obviously be the only location available.

Have you been able to create a minimum example where this bug still occurs? Otherwise, it might be some problem in your app's own logic, e.g. in some parts that require an internet connection.

Regarding the past location that is returned, is that really random or simply the last known location from before switching the internet off? In the later case, that wouldn't be too bad, would it?

ocram commented 7 years ago

Closing due to inactivity

sandeep551 commented 7 years ago

Hii Ocram ,

Thanks for your response and sorry for being late here to to respond you .

Actually the problem comes when internet is not present and gps is all time ON . then this problem comes and this is not just one time , i get it most of the time . i mean i get wrong location or past location as explained in my question asked .

Thanks, Sandeep

ocram commented 7 years ago

Sorry, I have no idea why the presence of an internet connection should be related to the accuracy of the location signal in any way. Try reducing your tests to a minimal example in order to eliminate other issues as the potential causes.