LocationClient vs LocationManager

前端 未结 4 1855
感情败类
感情败类 2020-12-09 02:27

What is the difference between LocationClient and LocationManager.

What is the pros and cons between them (like battery, accuracy)?

4条回答
  •  再見小時候
    2020-12-09 02:41

    I have worked on a tracking app and my experience is that LocationManager is better than LocationClient. LocationClient does not provide any way to specify that you want location updates from GPS only. All it allows is to specify "high accuracy". This works for most part but every now and then you get a location update which is hundreds of meters off BUT with a specified accuracy of a few meters. There is no way to know you got an unusable sample. With LocationManager if you specify GPS_PROVIDER you can be assured that you are never going to get wildly inaccurate samples. Working well for us.

提交回复
热议问题