问题
During researching I realized that there are different ways in Android to get the users location. First solution is by LocationManager and the second solution is FusedLocationProviderAPI, which is based on GooglePlay Services. In the internet I just could find tutorials & explanations of them separately. At work today somebody showed me that he is using LocationManager with Criterias that in the onLocationChanged-Method locations are received with the provider "fused". Does this mean that LocationManager also gather location information from fused API if available? I couldn't find any written information about that in the net.
Hopefully somebody can make this clear.
Thank you, Fin
回答1:
LocationManager uses FusedLocationProviderApi?
No, FusedLocationProvider(FLP) uses LocationManager internally.
If you wanna interact directly provider's itself, u can use LocationManager.
FLP wraps location providers like gps, network and sensors in your device. And provides you choose how you receive locations like
- More accurate results with more power usage
- Less accurate results with less power usage
Also u can watch Google's video (12:12 - 14:42), nice visual explanation.
来源:https://stackoverflow.com/questions/37395614/locationmanager-uses-fusedlocationproviderapi