0

I need to obtain lats and long using the Internet ip address in android... Like for example i have a Wifi Hotspot and my Device is connected to that Hotspot then is it possible to obtain lats and long using the ip address of that Current hotspot...?

coderslay
  • 13,960
  • 31
  • 73
  • 121
  • This is a duplicate of your other question: [How to Obtain Latitude and Longitude in Android](http://stackoverflow.com/questions/5496949/how-to-obtain-latitude-and-longitude-in-android) , no? – John Carter May 21 '11 at 14:10

2 Answers2

0

In your android settings, you can allow the use of your wifi network to obtain your location in the location services menu. Then, when you use LocationManager to start location services (locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, this)), it will use your wifi to find it. Note that you will also need to add these lines at the end of your manifest file (before </Manifest>):

<uses-permission android:name="android.permission.INTERNET"> </uses-permission> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"> </uses-permission> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"> </uses-permission>

Phil
  • 35,852
  • 23
  • 123
  • 164
0

You can use following service IP to location:

http://ipinfodb.com/ip_location_api.php

halfer
  • 19,824
  • 17
  • 99
  • 186
Ketan Parmar
  • 2,962
  • 19
  • 27