Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

[doc] Explain usage of the top level priority in GCM notifications #1155

Closed
fredgalvao opened this issue Aug 10, 2016 · 2 comments
Closed

[doc] Explain usage of the top level priority in GCM notifications #1155

fredgalvao opened this issue Aug 10, 2016 · 2 comments
Labels

Comments

@fredgalvao
Copy link
Collaborator

As partially discussed in #1145 and in some other issues, it seems like background notifications need to have the top-level priority field maxed out ({"priority": "high"}) in the payload for GCM to be able to consistently wake the service up and trigger the necessary code. This affects iOS more than Android, according to the number of issues created relating that field with iOS malfunctioning.

Documentation on that field is located subjectively here and objectively here.

A new section named GCM priority on background notifications is to be created as child of both sections related to this on the docs (android and ios).

However,

there is already mention of a use case of the inner priority field in the docs, but with a different sintax and possible values [-2,-1,0,1,2] vs ["normal","high"] (and most probably different behaviour). So, should we remove the current one and document only the GCM version? Should we keep both, and if yes, how do we differ from one another in behaviour?

@macdonst macdonst added the docs label Aug 10, 2016
@macdonst
Copy link
Member

@fredgalvao there are two different priorities. One to tell GCM how quickly it should attempt to deliver the message, that one is described here: https://developers.google.com/cloud-messaging/http-server-ref#downstream-http-messages-json

The second priority is to tell Android where to put the notification in the notification shade which is described here: https://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder.html#setPriority(int)

So both are needed but it is confusing.

@lock
Copy link

lock bot commented Jun 4, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants