android - FCM(Firebase 云消息传递)是否支持直接启动?

标签 android

我们有一个使用 Firebase 云消息传递 (FCM) 的 Android 应用程序,我们希望确保在设备重新启动时和解锁屏幕(直接启动情况)之前收到所有推送通知。

对于 Pixel XL 设备,只有在屏幕解锁后才会收到推送通知(这与 Galaxy S8 的行为不同)。

对于 Pixel XL 设备,在 Logcat 控制台中观察到以下错误和警告:

11-07 14:45:33.331 1574-1758/? E/GmsClient: unable to connect to service: com.google.android.contextmanager.service.ContextManagerService.START on com.google.android.gms
11-07 14:45:33.334 922-1525/? W/ActivityManager: Unable to start service Intent { act=com.google.android.contextmanager.service.ContextManagerService.START pkg=com.google.android.gms } U=0: not found
11-07 14:45:33.336 922-1497/? W/ActivityManager: Unbind failed: could not find connection for android.os.BinderProxy@19bf522

如果您已成功为直接启动实现 FCM 推送通知或之前遇到过相同问题,请提供帮助。

最佳答案

2022-06 更新:

根据 FCM 文档,它现在支持 DirectBoot 中的消息:

https://firebase.google.com/docs/cloud-messaging/android/receive#receive_fcm_messages_in_direct_boot_mode

原答案:

在最近关闭的 Google+ 上有一条关于它的评论:https://plus.google.com/+AndroidDevelopers/posts/Q5iTa8Gyffd Google+ screenshot

上面的评论作为文本:

none of Google Play services is currently available while the device is locked - you'll need to wait for the device to be unlocked before any of those services, FCM included, is available.

Ian Lake 好像是谷歌的,https://medium.com/@ianhlake :

Android Framework Developer at Google and Runner www.google.com/+IanLake

关于android - FCM(Firebase 云消息传递)是否支持直接启动?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47165147/

相关文章:

android - 与引擎物理联合

android - 使用来自 Cloud Endpoints 的客户端库。 jar导入不工作

android - YouTube API Android 自动启动

android - 无法使用生命周期版本 2.2.0-alpha01 功能

android - SMS Retriever API - 永久监听器

android - 是否可以在 NavigationView 中禁用可点击的 HeaderLayout?

android - 在android中绘制自定义形状

android - 错误 : Found byte-order-mark in the middle of a file [ByteOrderMark]

javascript - Android WebView 推送通知?

android - Gradle 无法在新的 Android Studio 2.0 中同步我的项目