Location Provider SAMSUNG always returns true

天大地大妈咪最大 提交于 2019-12-11 08:27:34

问题


I am trying to check if it is possible to fetch the location using Location Manager using the below procedure

LocationManager service = (LocationManager).getSystemService(Context.LOCATION_SERVICE); boolean network = service.isProviderEnabled(LocationManager.NETWORK_PROVIDER);

The above logic works fine in Sony Ericsson, but when it comes to samsung, 'service.isProviderEnabled(LocationManager.NETWORK_PROVIDER)' always returns true., even with GPS , WiFi turned OFF and even with out a SIM card inserted.

Did anybody come across this? Any help would be appreciated. Thanks in advance.

来源:https://stackoverflow.com/questions/10583058/location-provider-samsung-always-returns-true

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!