问题
I'm not a developer, but a graphic that needs to publish a digital kiosk magazine made with twixl platform.
I followed the steps of the twixl documentation to create a Sender ID for notifications on Android (FCM/GCM). I created an app where I associated a Sender ID (API key) and everything worked. I also have the statistics for a few days in which the app was active.
For certificate problems, however, I had to cancel this publication and do another, from the same account (app@pizzanew.it).
In Google Cloud Platform, I deleted the old project and I created a new one. Now, when I go to the Google Developer Console to associate a new id, it tells me that the value of API Key is not valid.
It may be that it is linked to the old app or in some way that I do not know? But the old app is no longer published.
I do not know how to do it, but I must be able to set this id for notifications. I configured only general information of the new app, but it has not yet been published, and I have not uploaded the new APK. May it's because of it?
Appreciate any help.
回答1:
There are two concept to understand:
sender-id : this is the ID of the project in Google Cloud Console (for old projects) or Firebase Console (for new projects)
server-key : (also referred as API-Key) this is the "password" for your server to send messages.
If you want to change your SENDER-ID:
- create a new Firebase Project: https://firebase.google.com
- read the SenderId & Server-Key in the settings
(Where can I find the API KEY for Firebase Cloud Messaging?) - update the sender-id in all the configurations you have
(if you are using the FCM sdk you need to download the new google-services.json file)
PS: you should be able to undelete the old project from Google Cloud Platform if you need to keep the same sender-id. But new projects should be created in Firebase Console, and old projects who need a new server-key should import the old project into the Firebase Console.
来源:https://stackoverflow.com/questions/39392627/problems-with-google-developer-console-sender-id-for-gcm