android - network provider of location manager is unavailable -
android - network provider of location manager is unavailable -
the next code print false
this.locationmanager = (locationmanager) getsystemservice(context.location_service); log.d(tag, "network provider enabled: " + locationmanager.isproviderenabled(locationmanager.network_provider));
the permissions have been required include:
<uses-permission android:name="android.permission.internet" /> <uses-permission android:name="android.permission.access_coarse_location" /> <uses-permission android:name="android.permission.access_fine_location" />
in settings
, location switches has been turned allowed. then, why network provider unavailable?
update: same code prints true on samsung galaxy device, google nexus device(nexus 4) , lenovo device, false on motorola droid device(droid boinic cm11) , sony device. in "settings", location switches have been turned allowed on devices. seems device or os issue.
android location
Comments
Post a Comment