After searching for an answer for few weeks now, came across countless dissections – no one offered a solution or even identified the problem (or change)
https://github.com/firebase/quickstart-android/issues/89
https://github.com/firebase/quickstart-android/issues/100
https://github.com/firebase/quickstart-android/issues/88
https://code.google.com/p/android/issues/detail?id=219084
Push notifications are delayed in Android Doze mode
We’re developing a calling app, We need to send a push notification to wake up the target device, load our app to the foreground (activity intent, disabling screen lock), start ringing and waiting for user action.
Galaxy Note 5 running Android 6.0.1 does not waking up after entering idle/Doze mode.
- when the device is not in idle mode, the push arrive successfully.
- On all other devices I have it works fine. (also running android 6.0.1- not samsung)
We’re sending only “data” json object/ tag (no “notification” object/ tag)
As i can see it's a repetitive issue, i followed all answers no success:
Did anyone experience this problem with devices running android 6.0.1?
Is there a definite answer to this issue? or is it a samsung bug? (i posted the question to samsung support as well)
Thanks for all helpers
Details: Android studio: 2.1.2
top gradle:
dependencies {
classpath 'com.google.gms:google-services:3.0.0'
}
app gradle:
compile "com.google.firebase:firebase-messaging:9.4.0"
apply plugin: 'com.google.gms.google-services'
targetSdkVersion 23
app manifest:
<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
);