Skip to content Skip to sidebar Skip to footer

Does Firebase Cloud Messaging Depend On The Package Name?

I want to know if package name, defined on Firebase project console, is tightly related to Firebase Cloud Message successful delivery or it's just a helper for creating google-serv

Solution 1:

Having the right package name is important for several services, though not FCM specifically, other than getting it right in the google-services.json as you found. FCM uses the project number to identify the app, which will be read from the JSON file.

The best thing to do is just to connect a new Android app to your Firebase project with the correct package name, and download the updated google-services.json. It wont hurt to have the other package name connected (and once the console allows deleting connected apps, you should be able to remove it).

Solution 2:

Well I did further research on the same.

I found that if package name defined on Firebase Console isn't the same as defined on Gradle and Manifest of the APP, then the APP won't be able to receive Notifications sent from Firebase Console.

In guess that in some way it's logic that package name must match in order to Android lunch the correct APP once notification arrives.

To sumarize, it's mandatory that both names matches.

I invite to test by yourself and keep and eye on package names for project success.

Post a Comment for "Does Firebase Cloud Messaging Depend On The Package Name?"