In android 4.0 and above call
LocationManager.requestLocationUpdates (LocationManager.NETWORK_PROVIDER, 0, 0, listener)
gives an exception like
Called: java.lang.IllegalArgumentException: provider = network.
Even if the network is turned on, the same exception is thrown.
I know this is a registered issue (http://code.google.com/p/android/issues/detail?id=19857).
My question is.
How to get a location by a network provider or in any other way (and not GPS) in Android 4.0 and higher?
source
share