本文介绍了使用Google Play服务进行访问时Google Drive API的配额是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解我们在使用网络时拥有Drive API配额应用

I understand we have Drive API quotas when we use web apps

如果我们使用Android Google Play Services Drive API,会有配额吗?

is there any quota if we use Android Google Play Services Drive API?

我该如何增加?

背景:

我的应用程序使用Google驱动器在设备之间同步应用程序数据,因此,一旦用户初始化设备,他将设置另一台设备,以便在我使用requestSync时立即进行同步.

My app uses google drive to sync app data between devices, so as soon as user initialize a device he will setup another device, for sync to happen immediately I use requestSync.

 Drive.DriveApi.requestSync(gClient).await(TIMEOUT, TimeUnit.SECONDS);

我经常由于requestSync失败而出现同步问题

Frequently i get sync issues due to requestSync failure with error

Sync request rate limit exceeded

推荐答案

Drive API允许每天提供10,000,000个请求的免费配额.但是,此数字仅表示开发人员每天可获得的配额.您可能会遇到速率限制错误,因为您正在遇到默认情况下为10的请求/秒数.

Drive API allows a free quota of 10,000,000 requests/day. However, this figure only represents the per day Quota available to a developer. You could be hitting rate limit errors because you are hitting the requests/second number which is by default 10.

要更改请求/用户/第二个速率,您需要登录到开发者控制台并更改编号.但是,实现指数补偿算法比将您的应用的每秒配额限制设置为更高的数字.在开发者控制台中,如果您已采用指数补偿算法来处理速率限制错误并每天达到配额限制,您还可以请求其他配额.

To change the Requests/User/Second rate, you need to log into your Developer Console and change the number. However, implementing Exponential Back-off algorithm will be much more advisable than setting your App's per second quota limit to a higher number. From Developer's console, you can also request additional quota in case you have Exponential Back-off algorithm in place to handle your rate limit errors and are hitting the quota limits per day.

有关为何实行配额限制的信息,请参阅此.

For information on why quota limits are in place, please refer to this link.

这篇关于使用Google Play服务进行访问时Google Drive API的配额是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 19:41