Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NETWORK_PROVIDER not worked in android versions 4.0 & above / API level 14 & above

Tags:

android

In android 4.0 & above a call to

LocationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, listener)

is giving exception as

Caused by: java.lang.IllegalArgumentException: provider=network.

Even if the network is enabled, the same exception occurs.

I know this is a reported issue (http://code.google.com/p/android/issues/detail?id=19857).

My question is.

How to get location by network provider or any other method (not GPS) in android 4.0 & above ?

like image 260
huzefa p Avatar asked Nov 13 '22 07:11

huzefa p


1 Answers

There is a open issue of android 4.0 framework , so network provider is not working but latest android version it had resolved and successful working ,Please check your code in latest android framework.

like image 52
android Avatar answered Nov 16 '22 02:11

android