【发布时间】:2018-06-23 14:49:27
【问题描述】:
我在一个 Android 应用中使用多个 Firebase 产品:
compile 'com.google.firebase:firebase-core:11.0.1'
compile 'com.google.firebase:firebase-database:11.0.1'
compile 'com.google.firebase:firebase-storage:11.0.1'
compile 'com.google.firebase:firebase-auth:11.0.1'
compile 'com.google.firebase:firebase-messaging:11.0.1'
这些产品中的一个或多个似乎正在使用WAKE_LOCK 权限。可能是 Analytics 或 FCM。
我能理解哪里需要它。然而问题在于,在 Google Play 控制台的 Android Vitals 部分中,Google 警告我 Stuck partial wake locks 百分比为 2.30%,大于 2.30% strong>不良行为阈值,即0.70%。同样,背景卡住的部分唤醒锁为 1.40%,再次大于 不良行为阈值,即 0.10%强>。
换句话说,Google 认为这个数量的唤醒锁是一种“不良行为”。
我不使用唤醒锁,所以问题似乎来自 Firebase SDK。
谁知道是什么原因造成的?我们可以解决这个问题吗?
【问题讨论】:
标签: android firebase firebase-cloud-messaging firebase-analytics android-wake-lock