Find the current location of mobile without using the GPS - android

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

Related

How to get user's current latlong without GPS and internet?

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.

Getting location using wifi only

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.

gps using Network provider and gps provider?

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 android is it possible to find latitude and longitude using wifi?

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.

Detect a speed in android

is it possible to detect a speed of a car using GPS or accelerometer in android phone ?
can anyone give me the road map to implement this ?
Yes, it's possible using GPS via object of Location class. There is getSpeed() method in this class.
It's very easy to find code of getting location. Check this link for example.

Categories

Resources