Android 中哪个 LocationProvider 需要付费才能使用?
Android中的LocationManager可以选择LocationProviders /标准.html” rel="nofollow">标准。 Criteria 类有一个方法 isCostAllowed 和 setCostAllowed。哪个LocationProvider需要用户花钱?它只是网络位置提供商,因为它会产生网络流量,还是只是因为未来的某些可能性而实施?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
一个可能需要花钱的例子是位置提供商访问手机信号塔位置或 WiFi 接入点位置的远程数据库。这些提供商将使用您的一些数据限额。
我不认为有任何位置提供商本质上需要花钱 - 成本在于使用您的数据限额。
One example that can cost money is a location provider that accesses a remote database of cell tower positions, or wifi access point positions. These providers will use some of your data allowance.
I don't believe there are any location providers that intrinsically cost money - the cost is in the use of your data allowance.
GPS 本身不需要任何费用,因为您的智能手机中有内置接收器。网络位置会花费您金钱,因为涉及到远程数据库的往返查找。本质上,这是与使用网络位置进行修复相关的数据成本。
GPS per se do not cost any money as there is an in-built receiver in your smartphone. Network location will cost you money as there is a round-trip of lookup involved from remote database. Essentially it is the data cost that is associated with getting the fix using network location.
我只是运行一个简单的测试来确认 NetworkProvider 是否被视为需要花钱的提供商:
如果我将允许的成本设置为 false 或 true,结果没有区别:
最好的提供商始终是网络。目前似乎没有任何提供商会花费用户的钱。也许这只是为了未来位置提供者的可能性而内置的。
I just run a simple test to confirm if the NetworkProvider is considered as a provider that costs money:
There is no difference in the outcome if I set cost allowed to false or true:
The best provider is always network. At the moment it seems as if there is no provider that would cost the user money. Maybe this is just built in for future location provider possibilities.