My question is to get location while having no internet and GPS off, is there any way?
Please don't give ans about GPSTracker class etc.. I used it..
Please give logical answer only.
no "NETWORK_PROVIDER" and no "GPS_PROVIDER"
is that possible?
I think its not possible, Itried a lot. I didn't found solutions...
Sorry if I am wrong.. Its my opinion.
There is company called IP2Location which maintains a number of databases which can convert an IP address into country, state, city, latitude, and longitude. Have a look at the following link:
http://www.ip2location.com/databases/db5-ip-country-region-city-latitude-longitude
This database can be useful if you need to get a user's location but you can't assume that he will be able to access either GPS or a web service.
I suggest try to use Google Maps Geolocation Api
you need POST a request, the the service will return a location with accuracy in meters.
Related
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.
without GPS you can not find address
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)
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)
I am developing an android application in which i want to use wifi only to find user's location is it possible to find location of your device just by using Wifi ?
In this app i m trying to guide user to go from one place to another inside a building so i want exact location cell tower location or gps location will not be of any help
LocationManager.NETWORK_PROVIDER will use either Wifi or cell tower location (not GPS). If you want the best location, that would be fine GPS (wifi is the least accurate.) You can ask the LocationManager to getBestProvider and require fine GPS with:
criteria.setAccuracy(Criteria.ACCURACY_FINE);
Based on your latest comment, I think you would like to guide a user inside a building and somehow get more accurate locations than a gps location (which would probably not be accurate inside a building anyway). While there may be some specific situation in which this would be possible, I would say no, there is not a general solution that could be applied.
For Current Location, using GPS is highly recommended. Because with only Wifi, it will not be accurate. But still you can use this:
String uriName = "geo:"+ lat+ "," + lon+ "?q=my+street+address";
startActivity(new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(uriName)));
This should work with roughly accuracy.
I think you want to guide the user while inside the building, if so, then I don't think that GPS or Wifi will be able to help you.
GPS provides a very fine location but require clear contact with the gps satellites in the space which won't be available inside buildings. Also the accuracy is within some meter distance which won't be effective in your case.
Cellular wifi will provide you location using the nearby cell tower which i think is self explanatory in your case. So, I don't think that both location services will of use in your case.
Hi, I am trying to get the gps location using location provider and gps provider at the Same time. I am trying for last two days but stil am struggling. I don't know how to do this,I am searching and get this link http://www.hrupin.com/2011/04/android-gps-using-how-to-get-current-location-example, but it's also getting force close. Anybody kindly give working example for gps usind network provider and gps provider
The link you provided is good only. So many examples available in web, one of them is given below.
Using GPS to get current location – Android tutorial
I hope it may help you.
In my Application i need to use user's current location.
Through GPS, i knw how to do it but can any body have idea that how it can be done using Wifi?
Pls do my help,
thanks.
Have a look at the Android Obtaining User Location documentation - especially the usage of the NETWORK_PROVIDER.
I am developing an restaurant locator for that i need to find the current location of mobile without using the GPS, is it possible?
kindly help me with the codes
Yes you can use the NETWORK_PROVIDER but why would one do that?
http://developer.android.com/reference/android/location/LocationManager.html#NETWORK_PROVIDER