0

My setup consists of two android apps, that use the same backend. I was sending push notifications based on the deviceID, meaning if you installed both apps on the same device, the listener of app 1 would listen also to notifications intended for app 2, and hell would break loose.

I would like to know if Firebase can support this type of project. So, does one Firebase project generates one Token per device per app, or only one Token per device? If the latest, any tips on how to get this working?

Thanks in advance.

1 Answers1

1

A registration (FCM) token corresponds to an app instance. AFAIK, different apps (unique by package name) should produce different tokens when getToken() is called regardless if it's using the same Firebase Project.

However, the usual (best?) practice is to have a separate project for every different app, then handle the multiple senders for each app.

AL.
  • 35,361
  • 10
  • 135
  • 270