问题
Following up with the ans I got from this post I would like to know how can I avoid making use of AGPS or network GPS.
I am using LocationClient in my code to fetch user's current location. The LocationClient is a fused API which automatically makes use of GPS_PROVIDER or NETWORK_PROVIDER.
My main intention here is to avoid deduction of money (For more information on this refer the SO question that I have linked above).
Thanks.
回答1:
Don't use fused. Use GPS_PROVIDER alone. That will use just your GPS hardware. The entire point of fused is to use AGPS and network to reduce the need for GPS and reduce battery use.
回答2:
LocationClient is the new GPS solution on Android which uses network/GPS and sensors to give you optimal location. When I say optimal I mean, battery, heat, cost and accuracy. Infact it is atleast 80% better when considering all costs.
I would strongly recommend that you use LocationClient API's. If you dont, you are better off using just GPS Provider from your LocationManager. LocationClient is a overkill.
来源:https://stackoverflow.com/questions/25225942/avoid-making-use-of-agps-or-network-gps-to-avoid-deduction-of-money-android