经过几周的寻找答案后,遇到了无数的剖析——没有人提供解决方案,甚至没有人找出问题(或改变)
https://github.com/firebase/quickstart-android/issues/89 https://github.com/firebase/quickstart-android/issues/89
https://github.com/firebase/quickstart-android/issues/100 https://github.com/firebase/quickstart-android/issues/100
https://github.com/firebase/quickstart-android/issues/88 https://github.com/firebase/quickstart-android/issues/88
https://code.google.com/p/android/issues/detail?id=219084 https://code.google.com/p/android/issues/detail?id=219084
Android Doze 模式下推送通知会延迟 https://stackoverflow.com/questions/38907834/push-notifications-are-delayed-in-android-doze-mode
我们正在开发一个呼叫应用程序,我们需要发送推送通知来唤醒目标设备,将我们的应用程序加载到前台(活动意图,禁用屏幕锁定),开始响铃并等待用户操作。
运行 Android 6.0.1 的 Galaxy Note 5 在进入空闲/打瞌睡模式后无法唤醒。
- 当设备不处于空闲模式时,推送成功。
- 在我拥有的所有其他设备上,它工作正常。 (也运行 android 6.0.1 - 不是三星)
我们仅发送“数据”json 对象/标签(无“通知”对象/标签)
正如我所看到的,这是一个重复的问题,我遵循了所有答案但没有成功:
有人在运行 android 6.0.1 的设备上遇到过这个问题吗?
这个问题有明确的答案吗?或者这是三星的错误? (我也将问题发布到三星支持)
感谢所有帮助者
细节:
安卓工作室:2.1.2
最高等级:
dependencies {
classpath 'com.google.gms:google-services:3.0.0'
}
应用程序等级:
compile "com.google.firebase:firebase-messaging:9.4.0"
apply plugin: 'com.google.gms.google-services'
targetSdkVersion 23
应用程序清单:
<service android:name="com.example.mypackage.GcmIntentService" >
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
Server:
$fields = array(
'registration_ids' => $registrationIDs,
'priority' => ‘high’,
'collapse_key' => 'Updates available',
'data' => array(
'Alert' => $message,
'Type' => $type ,
'Title' => $title ,
),
'time_to_live' => 0
);