Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send a high-priority GCM?

I'm using a Nexus 5 with Android M Preview.

My problem that I'm trying to solve is:

Network access is disabled, unless your app receives a high priority Google Cloud Messaging tickle.

What I'm doing is:

I put the phone into Doze mode and then I send a push notification with the priority with value 10 and I'm expecting to have internet access for a brief moments, but this is not working.

Should I use other type of notifications? There are any documentation already available?

Thanks.

Android M changes: https://developer.android.com/preview/behavior-changes.html

What I found about GCM priority messages: https://developers.google.com/cloud-messaging/server-ref

like image 693
jlopes Avatar asked Jul 09 '15 10:07

jlopes


1 Answers

Setting priority to 10 is the correct thing to do, but it does not work with the version of Android M released at I/O. It has been fixed, and priority 10 messages will work as expected with the public release.

like image 173
morepork Avatar answered Oct 21 '22 12:10

morepork