Are there any advantages of using FusedLocationProviderApi over LocationManager?

后端 未结 3 398
陌清茗
陌清茗 2020-12-16 14:13

Earlier to get user current location I have used LocationManager:

LocationManager locationManager = (LocationManager) getActivity().getSystemService(Context.         


        
3条回答
  •  一向
    一向 (楼主)
    2020-12-16 14:41

    Just keep in mind that FusedLocationProvider uses LocationManager under the covers to at least get GPS points. It may be performing Wifi scans and doing a look up on the results to determine location as well, instead of using the Network provider, but there isn't any documentation about this that I am aware of.

    Unless you cannot or do not want to use FusedLocationProvider, I would recommend using it.

提交回复
热议问题