I want to make app without use of GPS, and my app is using user's address. so for that i want any idea of getting address without GPS. I want address, not latitude and longitude. Geocoder can be use for getting address but its again using GPS. Please provide solution for my question.
-
to provide the exact address of the user you must use user location from the LocationManager. https://developer.android.com/training/location/retrieve-current.html – CptEric Aug 19 '15 at 08:08
-
1also, you should read the FAQ about how to correctly ask a question. http://stackoverflow.com/help/how-to-ask – CptEric Aug 19 '15 at 08:09
-
I'm voting to close this question as off-topic because StackOverflow is for questions-answers. Not for "give me ideas". – Budius Aug 19 '15 at 08:25
3 Answers
without GPS you can not find address

- 6,331
- 4
- 51
- 81
-
I can't get address by sim card location or by mobile location as well? – Maitri Shah Aug 19 '15 at 08:21
-
It's not true. You can get it if you have WiFi - that's the way [HTML5 Geolocation](http://www.w3schools.com/html/html5_geolocation.asp) works – Karol Klepacki Aug 19 '15 at 08:46
Get the user to manually enter their address. or bite the bullet and use geo-coding.
EDIT: you have 2 choices:
1) Use lat/lon and geo - coding to determine the address
or
2) User manually enters either lat/lon or address (which will not go down well)

- 2,470
- 1
- 20
- 30
-
Thanks for the answer but, I think geo-coding needs GPS to get address from Lat-Lng. and i could not allow user to enter address, because I want it to show on map in future and for that i needs accurate address. – Maitri Shah Aug 19 '15 at 08:20
1) You can get IP address by either $_SERVER['REMOTE_ADDR'] in PHP or using some external JavaScript application, and then pass it to some API like freegeoip and then pass received coordinates to Google. It's quite easy, but it's not reliable solution - it can be very accurate or totally inaccurate.
2) (preferred, but needs permission) You can ask user for with HTML5 Geolocation for his location and it's much more accurate (and then pass it to Google Reverse Geocoding)

- 1
- 1

- 2,070
- 1
- 18
- 30
-
hi @Karol, i like your answer, please explore this in detail, if you have more knowledge of this. – Maitri Shah Aug 19 '15 at 08:34
-
You can get IP address by either $_SERVER['REMOTE_ADDR'] in PHP or using some [external JavaScript application](http://stackoverflow.com/questions/391979/get-client-ip-using-just-javascript), and then pass it to some API like [freegeoip](https://freegeoip.net/) and then pass received coordinates to [Google](https://developers.google.com/maps/documentation/geocoding/intro). It's quite easy, but it's not reliable solution - it can be very accurate or totally inaccurate. You can also ask user for with HTML5 Geolocation for his location and it's much more accurate (and then pass it to G. Rev. Geo) – Karol Klepacki Aug 19 '15 at 08:45