Android Google Services Location costs and limitations

我的未来我决定 提交于 2021-01-28 05:27:46

问题


I would use in my app the location service provided by Google Services and I am in trouble understanding how it works.

I need to check user position for an amount higher then 1000 times so I need to enable the function that allows me to do 150 000 requests every 24h (or maybe I am in wrong?).

I have a Developer account on Google Play (paid 1 time for ever). To be able to check user position higher then 1000 times for day what have I to do? Do I pay for this ? How much?

What I found : https://developers.google.com/places/android/current-place

Thanks in advance.


回答1:


From the Google Places API for Android Usage Limits.

  • Usage of the Google Places API for Android is free and unlimited for all apps.
  • By default, each app is allowed 1 000 requests per 24-hour period.
  • You can increase the limit to 150 000 requests per 24 hour period by enabling billing in the APIs console, and thus verifying your identity. A credit card is required for verification. We ask for your credit card purely to validate your identity. Your card will not be charged for use of the Google Places API for Android.
  • If you expect to need more than 150 000 requests per 24 hour period, you should request an uplift as soon as possible. (This involves checking your app for compliance with our terms of service, and then completing a quota request form.)
  • If the number of requests exceeds 500 000 per 24 hour period on a regular basis, we consider your app a significant user of the Google Places API for Android. We will be in touch to chat about planning capacity. You don't need to take any action until we contact you.

In short you will not be charged but you must enable billing and verify a credit card to get an increased rate limit of 150,000/24 hours. If you need more than that you just have to fill out the form requesting more.




回答2:


So, you might want to reconsider why it is that you're even thinking you need the ability to remotely poll for location information every half second. The reason that there's an extra charge for it is that it's highly unlikely anyone doing something reasonable would ever need quite this much activity. Even 1,000 times a day is approximately every ninety seconds. Basically, you're straying into "Big Brother" territory with that level of watchfulness--especially when it doesn't sound like something the user would be able to easily control.

What you should almost certainly be doing is instead using a location strategy through code on the device and then reporting back from the device over a more reasonable interval depending on how rapidly (or not) the device is moving. Current Place was certainly not designed to spy on users, and is by design difficult to use for that.

You've not given a lot of details but my guess is that what you're really needing to use is Google Cloud Messaging and XMPP (or just fire back UDP packets) as a communications mechanism for whatever this project is.



来源:https://stackoverflow.com/questions/29500651/android-google-services-location-costs-and-limitations

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!