High priority push notification can't wake up android phone while in doze

1,876 views
Skip to first unread message

ahu...@gmail.com

unread,
Oct 24, 2017, 4:52:39 PM10/24/17
to Push Notifications Development
Hi!

I am developing a PWA and I need to receive push notifications.
Everything works great but when the android phone enters doze, the high priority notifications are unable to wake up chrome browser or the service worker to show the notification for the user.

Is this the correct behavior of chrome in android ?

Is there a way to work around this scenario or do I have to drop the web app development in favor of an native android app?

Thanks a lot!

Ahumaro

Anita Woodruff

unread,
Oct 25, 2017, 6:24:18 AM10/25/17
to ahu...@gmail.com, Push Notifications Development
Hi Ahumaro,

Great to hear you are developing a PWA! Excellent question about the wake-up behaviour. 

A couple of questions for you:
1. How are you setting the push notifications as high priority?
2. Which version(s) of Android are you testing on?

Afraid I'm not sure of the answer to your question, but hopefully someone on this mailing list knows. (And if not, I will make it my mission to find out!)

I would venture a guess that you should see the same wakeup behaviour as any native app that receives a GCM message, since we use the same stack. 

Thanks

Anita

--
You received this message because you are subscribed to the Google Groups "Push Notifications Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to push-notification...@chromium.org.
To post to this group, send email to push-notifi...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/push-notifications-dev/701cd0a2-1143-4297-b5c1-ecdb21a6a1a5%40chromium.org.

ahu...@gmail.com

unread,
Oct 25, 2017, 12:40:43 PM10/25/17
to Push Notifications Development, ahu...@gmail.com
Hi Anita! thanks for the answer!

I am setting the priority according to the information in this document:
https://firebase.google.com/docs/cloud-messaging/concept-options?authuser=0#setting-the-priority-of-a-message

Here is an example I am using to generate the message (removing my private keys of course and FCM Token already registered at that topic):

curl --header "Authorization: key=MY_KEY" --header "Content-Type: application/json" -d '{"to": "/topics/my_topic", "priority": "high", "notification": {"title": "My Title", "body": "My Body", "icon": "/images/icon.png"}}' https://fcm.googleapis.com/fcm/send

The phone I am testing with is a Nexus 6p with Android 8.0.0.
The Chrome version is 61.0.3163.98

As I mentioned, in normal conditions, the messages are delivered and showed almost instantly, but if I let the phone rest for a while and enters doze, Notifications never are shown. No bell, no nothing.

I don't know who is responsible for waking up the phone, if the FCM manager or chrome itself.

Thanks!

Ahumaro

Anita Woodruff

unread,
Oct 26, 2017, 11:47:24 AM10/26/17
to ahu...@gmail.com, Push Notifications Development
Hi Ahumaro,
Thanks for the information.

We've had a similar report filed in our bug tracker here, and we're looking into it. You may wish to star the bug for updates.

Best wishes,

Anita

--
You received this message because you are subscribed to the Google Groups "Push Notifications Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to push-notification...@chromium.org.
To post to this group, send email to push-notifi...@chromium.org.
Reply all
Reply to author
Forward
0 new messages