2

Recently I changed the “google-services.json” file in my app. The previous developer use different “google-services.json” file, so I changed it for getting firebase analytics. I don’t have the access the previous Firebase project, so I cannot use firebase analytics. After changing the “google-services.json” file, I am not getting push notification in my app. Do I have to change anything from backend? Thanks in advance

2 Answers2

3

Your Backend is still sending the push messages to the previous FireBase project. So when you change the FireBase project and have a new google-services.json configuration you need to update the ServerKey on your backend as well.

How to get the Server Key on Firebase

  1. Go to https://console.firebase.google.com/
  2. Select the project
  3. Click on the Project Overview → Project Settings
  4. Select "Cloud Messaging" tab.
  5. Under "Project credentials" you should be able to see the Server key or generate a new one.
ChristianB
  • 2,452
  • 2
  • 10
  • 22
0

Just changing “google-service.json” file won't work

After changing the “google-service.json”, run flutter clean will fix the issue