firebasefirebase-cloud-messaginggoogle-playapp-storebranding

Send FCM from one Firebase account to apps compiled w/ different package names


This may really be more of a branding question but I'm asking here because it has to do with how FCM handles notifications.

We have an app that sends notifications to users based on the topic they subscribe to. The topics are specific to our customers who are businesses themselves. So the relationship is:

Our Company -> Other Company (our customers) -> Other Company's Customers (end users)

Say we have "Other Company A" and "Other Company B" with topics "A" and "B". Company A can use our system to send notifications to it's customers, and Company B can do the same. When their customer (end user) downloads and opens the app, they put in a topic A or B. This subscribes to the topic and also downloads that particular company's image, info, etc. so it is semi-branded for that company.

Now those companies want the app to show up in their own app/play stores. So we re-compiled the app changing the package name from com..app to com..app to submit to their stores even though that seemed like a brute force approach. But now notifications do not go through to the newly compiled apps.

I'm not sure what needs to change so that notifications can be sent from the same Firebase service to differently compiled apps?

And I guess the higher-level question would be is this even the correct approach for taking the app and branding it for a customer? The business only wants their customers (the end users) to see the app in their store instead of ours, and to have their image saved on the mobile devices instead of our company image when the app is installed.

Any guidance would be greatly appreciated!


Solution

  • It is recommend to have apps for different customers on separate Firebase projects. While combining them into a single project may work in some cases, there is no guarantee this may continue to work as you scale.

    For example, you can only have a limited number of OAuth client IDs in a project, and a limited number of apps. Once you hit those limits, you'll need to set up multiple projects anyway, so you might as well do that straight away and find another way to optimize rolling out apps for new customers.