LocationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER) is not reliable, why?

前端 未结 4 1293
孤城傲影
孤城傲影 2020-12-06 02:55

One user of my app reported that app tells network for location is off even he did turn it on. He sent me few screen shots and they made me think;

LocationMa         


        
4条回答
  •  醉梦人生
    2020-12-06 03:08

    Not directly an answer to your question(s), but check out the new Location API that Google launched last week. It's really easy to implement and it will check for the best possible location without wasting battery. http://developer.android.com/google/play-services/location.html and here's a session at Google I/O about this new API and how to use it. http://www.youtube.com/watch?v=Bte_GHuxUGc

    This way you don't need to worry about checking if the GPS is on or not and stuff like that

提交回复
热议问题