0

I have one problem in my application,

The GPS satellite icon on the title bar keeps coming on and off . Even when I have no connection to internet?How to disable this icon when internet is disconnected?

Nanne
  • 64,065
  • 16
  • 119
  • 163
  • You mean you want to disable a system Icon using your own code? Or you want to set GPS to off if you have no internet? Or you don't want to request a location if you have no internet? Is this even a code question or just an Android question? And how come this rather bleak question has that many upvotes? It's all a mystery! – Nanne May 22 '12 at 06:24
  • 1
    GPS and internet are two separate entities. – Zach Rattner May 22 '12 at 06:27

1 Answers1

1

It's the expected behaviour. Getting a location fix doesn't depend on internet connection. It just tries to get a lat long from the satellites, even though you don't have a connection to the internet.

Kumar Bibek
  • 9,016
  • 2
  • 39
  • 68
  • Thank u. I have one more doubt.If I disable the GPS service then,Can I get the lat long through internet. I tested that one, I am getting lat and long through internet without GPS service. Then what is the use of that one –  May 22 '12 at 06:55
  • You can't get lat long through internet. If not GPS, you will need to get them through your mobile network. Else, the last resort is perhaps, get your IP, and query a location service to give the lat long for that IP. – Kumar Bibek May 22 '12 at 07:16