Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: Update your apps to the latest Firebase Cloud Messaging APIs and SDKs #257

Open
appzer opened this issue Dec 12, 2023 · 3 comments

Comments

@appzer
Copy link

appzer commented Dec 12, 2023

Hi, currently i use a self modified version of the older plugin > https://github.com/phonegap/phonegap-plugin-push
All works fine at least with the latest Android version 13 & 14.

But yesterday i got the following message from Google!
What needs to be adjusted on the Cordova app/plugin and on the server side.
Can someone explain!

Thanks Kevin

firebase

@nbadiganti
Copy link

+1 following for this change

@andreszs
Copy link

I'm also receiving the same warnings from Google, hopefully the Cordova plugin has nothing to do.

You need to change the server side code only to use the HTTP v1 API to send the notifications. I remember trying to switch to this API years ago, but failed due to certain server requirements that were absolutely impossible to meet.

@viking2917
Copy link

viking2917 commented Mar 6, 2024

They explain in the email which things need to be done based on your usage. In my case, it was to update the legacy protocol to v1 of the API, and stop using static server keys.

Documentation for how to do that is here:
https://firebase.google.com/docs/cloud-messaging/migrate-v1#node.js_2

Basically one has to:

  1. use a different url
  2. stop using a global authorization key and use oAuth v2, and
  3. update the payload to a new structure

For #2, the oAuth, my backend is in PHP and I found this very helpful for that part of the process: https://stackoverflow.com/questions/65633126/generating-oauth-token-for-firebase-cloud-messaging-php

The challenge I am now facing is that background notifications seem to be not processed in quite the same way. I have filed a separate ticket for that: #266

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

No branches or pull requests

4 participants