Skip to content

Add Logging to Detect FCM Message Deprioritization#12

Open
WesUnwin wants to merge 2 commits into
masterfrom
depioritization-logging
Open

Add Logging to Detect FCM Message Deprioritization#12
WesUnwin wants to merge 2 commits into
masterfrom
depioritization-logging

Conversation

@WesUnwin
Copy link
Copy Markdown
Member

So far not yet happening but if / when this happens there will be consequences.
This will allow us to detect that the message was deprioritized and what happened to its priority level.

int currentPriority = remoteMessage.getPriority(); // PRIORITY_HIGH = 1, PRIORITY_NORMAL = 2, PRIORITY_UNKNOWN = 0

if (originalPriority != currentPriority) {
Log.e(TAG, "onMessageReceived: MESSAGE DEPRIORITIZED! originalPriority: " + originalPriority + " currentPriority: " + currentPriority);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this collected somewhere that we can see?

how would this help us identifying problems unless the phone is being watched by a dev?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could additionally try to report errors/logs to Google play or appsignal or something.

This is still somewhat useful as we (devs) could attempt to run through reproduction steps, and use this to see what is happening to the message priority. Or if its someone like Sara or QA, we could (possibly) provide instructions on how to check logs.

Will try to think of something for that and propose something

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a general / existing problem with viewing android Logs against other people's including customers, QA, etc. devices.

I'll try to think of what we should do for that

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i use https://docs.appsignal.com/api/public-endpoint/errors.html in google-calendar add-on to collect data (created a separate appsignal "environment" for this purpose)

maybe it's an option for you too.

Copy link
Copy Markdown
Member Author

@WesUnwin WesUnwin Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking into this (sorry for the delay)...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants