Does Gps Require Internet

Does GPS require Internet?

As others have said, you do not need internet for GPS.

GPS is basically a satellite based positioning system that is designed to calculate geographic coordinates based on timing information received from multiple satellites in the GPS constellation. GPS has a relatively slow time to first fix (TTFF), and from a cold start (meaning without a last known position), it can take up to 15 minutes to download the data it needs from the satellites to calculate a position. A-GPS used by cellular networks shortens this time by using the cellular network to deliver the satellite data to the phone.

But regardless of whether it is an A-GPS or GPS location, all that is derived is Geographic Coordinates (latitude/longitude). It is impossible to obtain more from GPS only.

To be able to return anything other than coordinates (such as an address), you need some mechanism to do Reverse Geocoding. Typically this is done by querying a server or a web service (like using Google Maps or Bing Maps, but there are others). Some of the services will allow you to cache data locally, but it would still require an internet connection for periods of time to download the map information in the surrounding area.

While it requires a significant amount of effort, you can write your own tool to do the reverse geocoding, but you still need to be able to house the data somewhere as the amount of data required to do this is far more you can store on a phone, which means you still need an internet connection to do it. If you think of tools like Garmin GPS Navigation units, they do store the data locally, so it is possible, but you will need to optimize it for maximum storage and would probably need more than is generally available in a phone.

Bottom line:

The short answer to your question is, no you do not need an active internet connection to get coordinates, but unless you are building a specialized device or have unlimited storage, you will need an internet connection to turn those coordinates into anything else.

Does GPS need internet to find out latitude and longitude?

No, GPS Doesn't required any Internet for getting your location. It is just a satellite position system. For a brief description you can refer this link.

Do a GPS device needs Internet Connection?

If you use the device's embedded GPS, you can get the longitude and latitude with no problem, without having any Internet access.

You can then use those coordinates however you'd like, so yes on Google Maps for example. Nevertheless, if you plan to use a Google Maps online API (for instance, the JavaScript API) you'll need an Internet connection to download and display the map. But there should be a way to use pre-downloaded maps offline, you will surely find it in the Google Maps API reference : https://developers.google.com/maps/documentation/

You can also take a look at some other mapping service providers (OpenStreetMap is one of the most used in replacement of Google Maps).

Sorry for not bringing a very precise answer concerning offline maps, but I hope this will help you with your issue :)

EDIT

It appears that it isn't possible to legally use the Google Maps API without an Internet Connection, according to Google Maps' Terms of Service

Getting GPS co-ordinates quicker programmatically without internet, but using network provider and mobile GPS

1. I want to get the GPS location at ~0.0001 accuracy

You can listen only to GPS provider and discard a location when it doesn't have the minimun accuracy you want:

locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 5, myLocationListener);  // "myLocationListener" must be an object from a class that implements LocationListener 

// "myLocationListener" implementation of LocationListener.onLocationChanged
public void onLocationChanged(Location location)
{
int MIN_ACCURACY = 5; // in metters
if ((!location.hasAccuracy()) || (location.getAccuracy() > MIN_ACCURACY))
{
// discard this location and keep listening to new location readings
}
else
{
// that's a good reading!

// do somethings you want... blah, blah, blah...

// stop updates when you get the location to preserve users' battery.
locationManager.removeUpdates(myLocationListener);
}
}

2. Don't want to use internet; Though GSM/CDMA network is ok

Yes, GPS works totally off-line. Android can make use of internet ONLY to update A-GPS data cache and provide faster reads in cold-start updates.


3. Should be obtained programmatically when the app starts

Then call item locationManager.requestLocationUpdates on mainActivity's onCreate event.


4. Should be quicker, say within a minute (like iPhone, which probably
works in Airplane mode as well!)

Keep in mind that iPhone works with "high quality hardware". Android can be run on crappy devices. So it'll depend of:

  • The device's hardware quality;
  • The number of satellites that are visible in the sky at that moment;
  • The age of almanac and ephemeris data on gps cache;
  • GPS can fail to read satellites because user is inside a building or something.

5. The code should work in most of the devices

What is the oldest Android's API you want it to run?


6. The phone may switch-on/off anytime and travel any distance

I didn't get it. What is your concern about this?

------------------------------------------------------------------------------

Update 1:

"...I would like to use Android 4.0 and above..."

I've tested GPS features from Android 2.3 to 5.0 devices. Everything runs pretty fine on all of them.

"...I have observed that 1 geo-coordinates based demo app which was working in other devices, din't work in my LGG3 with Android 5.0. Any idea on that?..."

Did you check GPS permissions on Android settings? (Maybe it's disabled) Or can be a hardware issue? Did you try in another similar device?

"...Suppose the GPS is showing correct location in New York,
I switch off the phone and then switch on after reaching to London,
then will it still show correct location (without internet)?..."

Sounds you're confusing things: reading a GPS location is one thing. Showing that location into a MAP is another different thing!

You don't need to be connected to the internet to do GPS location reading. But, if you want to show that location into a MAP, probably you're gonna need internet (to load map resources, etc.).

If you nedd to stay collecting GPS locations periodically (let's say, from 10 to 10 minutes), then it will be better to use AlarmManager to schedule a timer that will "finger" your app and say "hey, time to make a GPS reading!".

"...Also what is your opinion about the latest Fused API?..."

I've tested it and used it for a while, but I gave it up. It needs that Google Play Services be installed to work (not a problem, most users have it on their devices). But if you need ACCURACY (as I do), it will not work. It uses "fused sensors" (accelerometer, gps, wifi, compass, etc...) to try to get user location with minimum power possibile. Sometimes, it says you're 10 miles away from where you're really is. I couldn't make it work fine to keep the "path" where user has been. But it really saves battery.



Related Topics



Leave a reply



Submit