Google Play 服务概览
Google Play 服务在 Android 上提供了丰富的 SDK,可帮助您构建
加强隐私保护和安全性、吸引用户以及拓展业务。
这些 SDK 的独特之处在于,只需使用瘦客户端库
如图 1 所示。在运行时,客户端库
用于指明 SDK 在 Google 中的大部分实现和使用范围
Play 服务。
通过提供共享的客户端实现,Google Play 服务可以:
- 帮助优化设备端资源(例如存储空间和内存),以提高性能
应用质量和用户评分总体
体验。
- 接收自动更新(独立于操作系统、OEM 或应用更新),以便您
用户能更快获得改进和问题修复。
- 为向后兼容 Android 6.0(API 级别 23)且
支持各种外形规格的设备,让您能够覆盖更多用户,
更省力。
图 1. Google Play 服务会收到定期更新,其中包括
并修复了多个问题
Google Play 服务的运作方式
SDK
每个由 Google Play 服务提供支持的 SDK 都提供了一个轻量级客户端库
,其中包含与各自服务进行交互所需的 API。其他
API 可让您在运行时解决任何问题,例如缺失、已停用或
过时的服务。如果您使用的是 Android Studio 3.4 或更高版本,并启用
代码缩减,R8
优化工具可以
进一步减少每个 SDK 占用的空间及其对应用软件包的影响
。
要使用新的 Google Play 服务功能或产品,请在
新版本发布至 Google Maven
存储库。
服务
Google Play 服务包含设备端 Google 服务,这些服务在
所有 Google 认证的 Android 设备上的背景资料
Google Play 服务的自动更新与运营商、
操作系统或 OEM 系统映像更新。一般情况下,运行 Android 6.0 或
只要这些设备安装了 Google
已安装 Play 服务,且有足够的可用存储空间。这意味着
更快地接收改进和问题修复,并且您还可以利用
最新的 API,同时覆盖 Android 生态系统中的大多数设备。设备
或未安装 Google Play 服务的设备,
不受支持。
后续步骤:设置应用
要开始在您的应用中使用 Google Play 服务 API,请阅读此设置
指南。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-09-05。
[null,null,["最后更新时间 (UTC):2024-09-05。"],[[["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"]]