Do the Android users have the chance to reset the NetworkProvider, so that the location will be null?
I came up with the idea, that its only possible to have that location null, after starting the device the very first time. But also than google will check the location right away for my opinion.
Sure, I'm implementing a default location for this rare case. I just want to know how seldom this case is.
It returns 'null', when the Service is disabled in Settings > Location and Security > location through network
So that can happen quite often.
Depends how frequently connects the user to the Internet.
The cell ids have to be translated to a coordinate, and as I know there is a cache, it will remember even when offline the cell ids already translated, but on new ones, it won't give you location updates until the phone it's not connected to Internet.
Anyway, you always needs to check the date of the location, as it might be outdated. Especially after you put your phone in airplane mode and travel to the other part of the world.
In my testing I've found it's null fairly often. Not a lot of things consume the GPS without the user telling them to. But the problem with getLastKnownLocation is that it can be extremely out of date. So even if it's not null, it could be hours or even days old
It will probably also depend on how often you are polling it. That is, it could get set to null and stay there a while if you're not checking it frequently.
locationManager.requestLocationUpdates(provider, minTime, minDistance, this);
I had borrowed a project as a skeleton for a mapActivity project. It was return null all the time (with a gps provider) until i inserted the requestLocationUpdates() call.