【发布时间】:2016-11-21 15:02:18
【问题描述】:
是否可以在使用 Firebase 云消息传递在后台接收通知时使 Android 设备振动?从Syntax Reference 我已经看到并测试了支持声音,但没有关于振动的信息。或者是否有可能为此通知提供自定义实现,我可以直接设置振动?
【问题讨论】:
-
我认为您需要在构建通知时实施。你以前见过这个post 吗?
-
FCM 的问题是,当发送通知并且应用程序在后台时,Notification is built internally。我认为自定义通知的解决方案是只传递数据有效负载,因此guaranteeing that my service's onMessageReceived() method will be called,然后在方法实现中构建通知
标签: android push-notification firebase-cloud-messaging