StoreRules

规则 · 满足 Google Play 目标 API 级别要求

Migrate from Android 11 (API level 30) to Android 12 (API level 31)

通俗解读

以 Android 12(API 级别 31)为目标平台的应用必须更新蓝牙、位置、已导出组件和 PendingIntent 的声明,并遵循针对前台服务和通知 trampoline 的新限制。

  • 蓝牙:将 BLUETOOTH 和 BLUETOOTH_ADMIN 替换为 BLUETOOTH_SCAN、BLUETOOTH_ADVERTISE 或 BLUETOOTH_CONNECT;进行蓝牙操作不再需要 LOCATION 运行时请求。
  • 位置:每当请求 ACCESS_FINE_LOCATION 时,您还必须请求 ACCESS_COARSE_LOCATION,因为用户可以仅授予大致位置。
  • 包含 intent 过滤器的 Activity、Service 和 BroadcastReceiver 必须显式声明 android:exported;每个 PendingIntent 必须指定其可变性。
  • 以 Android 12 或更高版本为目标平台的应用无法从后台启动前台服务,少数特殊情况除外;否则将发生异常。
  • 应用不得从用作通知 trampoline 的 Service 或 BroadcastReceiver 中启动 Activity;在用户点击通知后,不能在其中调用 startActivity()。
  • Android App Links 验证需要包含 BROWSABLE 类别并支持 HTTPS 架构的 intent 过滤器。
  • 休眠机制会重置未使用应用的运行时权限和缓存,并阻止作业和提醒;自定义通知视图现在采用标准模板。

摘要由 StoreRules 撰写,并与官方原文核对。

官方原文摘录

Security and Permissions - Bluetooth: You must replace declarations for the BLUETOOTH and BLUETOOTHADMIN permissions with BLUETOOTHSCAN, BLUETOOTHADVERTISE, or BLUETOOTHCONNECT permissions. You no longer need to make LOCATION runtime permission requests for Bluetooth operations. - Location: Users can request apps to …

阅读官方全文 ↗ 在 StoreRules 规则库中打开 询问你的应用是否合规

开发者关于此条款的案例

暂无案例。

分享你的案例