新版 Places SDK for Android 提供更佳的效能和新的定價模式,因此值得更新使用 Places SDK for Android 的應用程式。如要進一步瞭解功能比較,請參閱「選擇 SDK」。
您可以參考本指南,瞭解 Places SDK for Android (新版) 與 Places SDK for Android 之間的主要差異,以及如何處理必要的變更。
遷移作業的帳單最佳做法
warning_amber
如果您的 API 用量足以進入第二級定價,就適用這項指引。遷移至較新版本的 API 時,您也會被收取其他 SKU 的費用。為避免在轉換期間增加費用,建議您盡可能在月初切換至實際執行環境中的新 API。這樣可確保您在遷移月份達到最具成本效益的每月定價層級。如要瞭解價格等級,請參閱定價頁面和定價常見問題。
啟用 Android 版 Places SDK (新功能)
Places SDK for Android 會依賴 Places API 服務。如要使用 Places SDK for Android (新版) 的功能,您必須先在 Google Cloud 專案中啟用 Places API (新版)。詳情請參閱「設定 Google Cloud 專案」。
接著,請確認您已將 Places API (新版) 新增至應用程式使用的 API 金鑰。詳情請參閱「使用 API 金鑰」。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-01-14 (世界標準時間)。"],[[["The Places SDK for Android (New) offers enhanced performance and a revised pricing structure, encouraging app updates."],["To minimize potential cost increases, it's advisable to transition to the new APIs at the start of a billing cycle."],["Before using the new SDK, enable the \"Places API (New)\" in your Google Cloud project and include it in your API key."],["Places SDK for Android (New) introduces mandatory field masking for Place Details, Nearby Search, and Text Search, defining specific data returned in responses."],["New features like Text Search (New) and Nearby Search (New) are additions to the SDK and do not require migration from existing functionalities."]]],[]]