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...?
Asked
Active
Viewed 633 times
0
-
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 Answers
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