Google Play 服務總覽
Google Play 服務在 Android 平台上提供一系列豐富多樣的 SDK,可協助您打造應用程式、加強隱私保護與安全性、吸引使用者及拓展業務。這些 SDK 的獨特之處在於,它們只需要在應用程式中加入精簡用戶端程式庫,如圖 1 所示。在執行階段,用戶端程式庫會與 Google Play 服務中的 SDK 實作項目和足跡進行通訊。
Google Play 服務提供共用用戶端實作項目,可讓您:
- 協助最佳化裝置端資源 (例如儲存空間和記憶體),進而改善應用程式品質和使用者的整體體驗。
- 接收自動更新 (不受作業系統、原始設備製造商或應用程式更新影響),讓使用者更快收到改善和錯誤修正項目。
- 可支援 Android 6.0 (API 級別 23) 的回溯相容性 SDK,可在各種板型規格上使用,讓您不費吹灰之力就能觸及更多使用者。
圖 1. Google Play 服務會定期收到更新,其中包含改善項目和錯誤修正項目。
Google Play 服務的運作方式
SDK
每個由 Google Play 服務支援的 SDK 都會提供輕量用戶端程式庫,其中包含與各自服務互動所需的 API。其他 API 可讓您在執行階段解決任何問題,例如缺少、停用或過時的服務。如果您使用 Android Studio 3.4 以上版本並啟用程式碼縮減功能,R8 最佳化工具可進一步縮減每個 SDK 的足跡,以及對應用程式套件大小的影響。
如要存取新的 Google Play 服務功能或產品,請在新版 SDK 發布至 Google Maven 存放區時升級。
服務
Google Play 服務包含裝置端 Google 服務,這類服務會在所有 Google 認證 Android 裝置的背景中執行。
Google Play 服務的自動更新會獨立於電信業者、OS 或 OEM 系統映像檔更新。一般來說,只要搭載 Android 6.0 以上版本的裝置已安裝 Google Play 服務,且有足夠的儲存空間,就會自動收到更新。這表示使用者可以更快收到改善和錯誤修正,您也可以在 Android 生態系統中觸及大多數裝置,並充分運用最新的 API。系統不支援搭載 Android 6.0 以下版本的裝置,或是未安裝 Google Play 服務的裝置。
後續步驟:設定應用程式
如要在應用程式中開始使用 Google Play 服務 API,請參閱這份設定指南。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-03-07 (世界標準時間)。
[null,null,["上次更新時間:2025-03-07 (世界標準時間)。"],[[["Google Play services optimizes app performance and user experience by providing shared, client-side implementations of SDKs, minimizing resource usage."],["Automatic updates to Google Play services ensure users receive the latest improvements and bug fixes quickly, independent of OS or device updates."],["Google Play services offers broad compatibility, supporting Android 6.0 (API level 23) and above, various form factors, enabling wider user reach with less development effort."],["SDKs powered by Google Play services utilize lightweight client libraries, reducing app size and ensuring efficient interactions with Google services."],["Google Play services runs essential Google services in the background on certified Android devices, delivering automatic updates for enhanced functionality and security."]]],["Google Play services provides lightweight SDK client libraries for Android apps, which interact with shared services on the device. These services optimize device resources, receive automatic updates independent of OS or app updates, and offer backward compatibility to Android 6.0. Developers can update SDKs to access new features through the Google Maven repository. Automatic updates are delivered to devices with Google Play services installed and running Android 6.0 or later. R8 optimizer can reduce the footprint of each SDK.\n"]]