Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Chủ đề này mô tả cách phát hiện và quản lý mức sử dụng API Dịch vụ trò chơi của Play trong trò chơi của bạn.
Phát hiện giới hạn số lần gọi
Nếu bạn đang sử dụng SDK Dịch vụ trò chơi của Play, trình xử lý lệnh gọi lại hoặc trình nghe sẽ trả về lỗi khi trò chơi của bạn vượt quá giới hạn số lần gọi.
Trong Android, lệnh gọi trả về các đối tượng
PendingResult, chẳng hạn như
incrementAchievementImmediate, trả về mã trạng thái STATUS_NETWORK_ERROR_OPERATION_DEFERRED trong đối tượng kết quả. Mã trạng thái này cho biết thư viện sẽ tự động gọi lại sau khi trò chơi không bị giới hạn số lần gọi nữa.
Để yêu cầu thêm hạn mức bổ sung cho trò chơi của bạn, hãy xem phần
tăng hạn mức.
Quản lý hạn mức hàng ngày của bạn
Bạn có thể xem lại hạn mức hằng ngày của ứng dụng cho Google Cloud Platform bằng cách truy cập vào dự án của bạn trong Google Cloud Platform.
Để xem hoặc thay đổi hạn mức sử dụng cho dự án hoặc để yêu cầu tăng hạn mức, hãy làm như sau:
Để xem và thay đổi chế độ cài đặt liên quan đến hạn mức, hãy chọn Hạn mức. Để xem thống kê sử dụng, hãy chọn Mức sử dụng.
Bạn có thể đặt số lần gọi tối đa mà người dùng có thể thực hiện mỗi giây, để giúp đảm bảo một người chơi quá nhiều không sử dụng hết toàn bộ hạn mức của ứng dụng. Để tìm hiểu thêm về cách giới hạn mức sử dụng, vui lòng xem
tài liệu về Google Cloud Platform.
Để yêu cầu thêm hạn mức bổ sung cho trò chơi của bạn, hãy xem phần
tăng hạn mức.
Yêu cầu tăng hạn mức
Để yêu cầu tăng hạn mức trò chơi, hãy nhấp vào đường liên kết Yêu cầu thêm bên cạnh mục hạn mức ứng dụng trong
Google Cloud Platform.
Chúng tôi thường không chấp nhận yêu cầu tăng hạn mức trò chơi, trừ khi trò chơi của bạn đạt đến mức sử dụng ngoại lệ, đồng thời tuân thủ các phương pháp hay nhất trong
danh sách kiểm tra chất lượng.
Nội dung và mã mẫu trên trang này phải tuân thủ các giấy phép như mô tả trong phần Giấy phép nội dung. Java và OpenJDK là nhãn hiệu hoặc nhãn hiệu đã đăng ký của Oracle và/hoặc đơn vị liên kết của Oracle.
Cập nhật lần gần đây nhất: 2025-08-30 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-08-30 UTC."],[],[],null,["This topic describes how to detect and manage Play Games Services API usage in\nyour game.\n\nDetect rate limiting\n\nIf you are using the Play Games Services SDK, your callback handlers or listeners\nreturn errors when your game exceeds its rate limit.\n\nIn Android, calls that return\n[`PendingResult`](https://developer.android.com/reference/com/google/android/gms/common/api/PendingResult.html)\nobjects,\nsuch as\n[`incrementAchievementImmediate`](https://developer.android.com/reference/com/google/android/gms/games/achievement/Achievements.html#incrementImmediate(com.google.android.gms.common.api.GoogleApiClient,%20java.lang.String,%20int)),\nreturn a `STATUS_NETWORK_ERROR_OPERATION_DEFERRED` status code in the\nresult object. This status code indicates that the library will automatically\nattempt to make the call again later when your game is no longer rate limited.\n\nTo request additional quota for your games, see the\n[quota increase](#quota-increase) section.\n\nManage your daily quota\n\nYou can review your application's daily quota for Google Cloud Platform by\nvisiting your project in the\n[Google Cloud Platform](https://console.developers.google.com/).\n\nTo view or change usage limits for your project, or to request an increase to\nyour quota, do the following:\n\n1. If you don't already have a [billing account](//cloud.google.com/billing/docs/how-to/manage-billing-account) for your project, then create one.\n2. [Visit the Enabled APIs page of the\n API library](https://console.cloud.google.com/apis/enabled) in the API Console, and select an API from the list.\n3. To view and change quota-related settings, select **Quotas** . To view usage statistics, select **Usage**.\n\nYou can set the maximum number of calls a user can make per second, to\nhelp ensure that an abusive player doesn't use up all of your application's\nquota. To learn more about capping usage, see the\nGoogle Cloud Platform\n[documentation](https://developers.google.com/console/help/capping-usage).\n\nTo request additional quota for your games, see the\n[quota increase](#quota-increase) section.\n\nRequest a quota increase\n\nTo request a game quota increase, click the *Request more* link next to\nyour app's quota entry in the\n[Google Cloud Platform](https://console.developers.google.com/).\n\nRequests to increase the games quota usually aren't accepted unless your game is\nexperiencing exceptional usage and is obeying the best practices in the\n[quality checklist](https://developers.google.com/games/services/bestpractices#9_quota_and_rate_limiting)."]]