3

I'm using network provider for location updates. Do I need to to have internet on my cell?

Here is my code

LocationMngr = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
LocationMngr.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, inteval, 0, this);
Dhasneem
  • 4,037
  • 4
  • 33
  • 47
  • see this link. http://stackoverflow.com/questions/6775257/android-location-providers-gps-or-network-provider – blitzen12 Apr 09 '13 at 10:42

4 Answers4

2

I'm getting confused of seeing other's Answer. Then I searched a lot and get some idea about that. While searching only, I have learnt about new concept of A-GPS. I would like to share those things with you.

There are three location providers.

1. GPS Provider

2. Network Provider (AGPS, CellID, WiFi MACID)

3. Passive Provider.

Note: I refer this from this site. As you asked question related to network provider, I will share regarding to that.

Network provider, name itself says that it needs network connection. Refer this article. It need network or WIFI connection to proceed.

A-GPS

GPS on cell phones is a bit more murky. In general, it won't cost you anything to turn on the GPS in your cell phone, but when you get a location it usually involves the cell phone company in order to get it quickly with little signal, as well as get a location when the satellites aren't visible (since the gov't requires a fix even if the satellites aren't visible for emergency 911 purposes). It uses up some cellular bandwidth. This also means that for phones without a regular GPS receiver, you cannot use the GPS at all if you don't have cell phone service.

For this reason most cell phone companies have the GPS in the phone turned off except for emergency calls and for services they sell you (such as directions).

This particular kind of GPS is called Assisted GPS (AGPS).

Note: Even if phone supports it, and network does not then this does not work

Community
  • 1
  • 1
Dhasneem
  • 4,037
  • 4
  • 33
  • 47
0

No need for Internet for retrieving location (GPS or Network provider). Using Internet can speed up the process and giving you more accurate locations (when dealing with Network provider).

Carnal
  • 21,744
  • 6
  • 60
  • 75
  • you don't need to give Internet permission for retrieving a location. You only need Internet permission when using functions that requires Internet, for example: maybe in your case you are using a MapView which will need the Internet permission in order to download the map data – Carnal Apr 10 '13 at 09:16
-1

No, the GPS sensors are independent of connections to the internet, so you don't need to worry about internet connectivity if you just want to get your location via GPS. I have a Nexus 10 which has a GPS sensor, and it works just fine when I'm roaming without internet connectivitiy.

Stochastically
  • 7,616
  • 5
  • 30
  • 58
  • Your code above originally said GPS_PROVIDER! Anyway, "Network Provider" only tends to work well when you have a mobile phone signal, and in my experience it's much less accurate than GPS. In any case, it's separate from any internet connection. – Stochastically Apr 09 '13 at 10:43
-1

no you don't need internet conection.but in some roms it may be some errors in conection. in gps module you don't need internet but some ways you can use wifi for more performance in.such as google navigation services.