0

I need to have latest gps coordinates when gps was enabled , for example I turned on my gps yesterday , today gps is not enabled but I need to have latest coordinate.

is there any way to get latest user gps coordinates when the gps was enabled ?

Thanks

mohamad bagheri
  • 499
  • 1
  • 10
  • 25
  • please specify question more breif – NovusMobile Jul 20 '15 at 05:27
  • possible duplicate of [What is the simplest and most robust way to get the user's current location in Android?](http://stackoverflow.com/questions/3145089/what-is-the-simplest-and-most-robust-way-to-get-the-users-current-location-in-a) – Shmil The Cat Jul 20 '15 at 05:31

2 Answers2

0

I think that, there is not a direct way to get a "non-existent" gps location. You have to use some of the repository, and then take the data from there. Storing in a database, file, server etc.

Majkl
  • 765
  • 1
  • 9
  • 25
0

LocationManager.getLastKnownLocation() might do what you want.

fweigl
  • 21,278
  • 20
  • 114
  • 205