Are Cloud Messaging Topics Shared Across Firebase Projects? - firebase

I have 2 Firebase projects, one for development and one for production.
If I send a message to a topic in one environment, will it send notifications to devices registered to both projects?
e.g. I have one device with the production app installed and subscribed to the topic broadcast, I also have another device with the development app install and subscribed to the topic broadcast.
If I then send a message to the topic broadcast using the development Firebase project notification composer, will only the device with the development app installed receive it?

It can be due to the reason that you have registered app in both project with same application id.
Try adding suffix in build.gradle file to the development version like .dev
And register the app in the firebase development project with this id i.e. your_app_id.dev
The app id will now help firebase identify you dev and production app

Related

Enabling Crashlytics with Firebase Management API

We are developing large number of customized Android and iOS applications for our customers. We have used Fabric to manage the crashes and Google Cloud Messaging to send push messages for the applications. We have now migrated all those applications to Google Firebase.
We are using Firebase Management REST API to create the applications into Firebase enabled projects from our PHP backend. For Android apps we use methods projects.androidApps.create and projects.androidApps.getConfig to get access to the application google-services.json. We include that to the build, which passes without errors and the push messages work without a problem. However, the Crashlytics side does not get enabled. In Firebase console there is only a wizard to set up a new Firebase app. When running it, it gives impression that Craslytics will get enabled, when the app starts using Firebase, but it is not.
Is there an API to enable the Crashlytics for an app? We can use REST or PHP based API in the backend. Also, if there is a client side API to awaken Crashlytics, we can use that too.
This is currently not possible, though with the new Crashlytics SDKs we are looking at ways of changing this behavior. In the future, as soon as we receive a crash event we will enable the Crashlytics dashboard. The timeline for this though, is unknown.

Should I be using firebase or firebase-admin on raspberry pi?

When writing Node.JS application for a Raspberry Pi communicating with Firebase, which npm module should be used?
What is the ideal way of doing things when on Raspberry Pi? Is it using firebase-admin or firebase package?
Both the regular Firebase client SDK, and the Firebase Admin SDK for servers can be used on a Raspberry Pi Node.js application. Which one to use depends on how you use the device and app.
The firebase module accesses Firebase as a regular client application, similar to how any other web app, iOS app, or Android app would access it. So with this SDK you'll typically ask the user to sign in with Firebase Authentication, and then use those credentials to access their data in Cloud Firestore.
The firebase-admin module however accesses Firebase as an administrative client. This means that it is authorized through pre-configured credentials, and can then access all data in Firestore and the rest of the Firebase project without any limitations. This SDK is used when you're creating an administrative application, that you then run on your Raspberry Pi.
So: if you're building a regular application that requires no special permissions, use the firebase module. If you're building an admin-type application that requires elevated permissions, use the firebase-admin module.

Firebase project notifications with multiple applications

I currently have two applications: A and B. In both there is a common functionality, a message box. When a message is sent to your mailbox, you receive a notification. If the message is sent from application A, it is sent a notification to application A of the destination. Otherwise, it is sent to application B.
The question is: it's better to have a firebase project for each of the applications or there is some way to have both applications in the same project and know which application each user has installed to send the corresponding notification.
All apps in a Firebase project share all resources of that project. So they all share the same Firebase Authentication users, the same (Firestore or Realtime) Databases, and the same Cloud Messaging keys and audiences.
Firebase projects are meant to host a single logical application. If you have an administrative app and an end-user app, a free and a premium version, and then have iOS, Android, and Web versions of all, you have up to 12 variants of the app inside a project, but they're really all just part of the same application.
There are also limits as to how many apps you can add to a Firebase project. The exact limits have varied a bit over time, but if you have more than 30 apps in a project Firebase may prevent you from adding more.
So: if you app A and B are variants of the same application, it's totally fine (and probably a good idea) to add them to the same project. If you have another use-case, keep the guidance above in mind.

how to enable Firebase Cloud Messaging in an apk published in the play store

I have developed an application using android studio. It is already published in the google play store.
This application uses the Firebase FCM service for push notifications.
During the development stage, this worked perfectly. But since the publication in the play store, the SendMessageNotification function is not executed in the firebase backend (Firebase functions).
I have entered the api key in the console, as shown:
.
However, the service continues without running.
Have I skipped a step?
Have you gone through the firebase launch checklist?
Specifically, have you remembered to add the production certificate for your app as well as the development certificate? From the above page "Add a release SHA1 fingerprint for Android apps in the Firebase console (for OAuth client IDs)."
I don't know if this affects client messaging or not.

Same APNs certificates for two different FCM projects with same app id

I have FCM working with my app in production then I requested APNs certificates and uploaded them to development & production section in Firebase as written in the docs and everything is working as expected.
Now, I created another Firebase project which serves as a development environment, with an identical app id, but with different FCM Server key.
If I upload the same certificates I used in production to this development environment, will the FCM notifications be sent to development only or to production as well?
For APNs It does not support one certificate and two firebase projects.
It will be sent to both. I just learned the hard way.

Resources