Does Firebase.initializeApp() require network connection? - firebase

I'm building a flutter app, and in order to integrate Firebase to it, I have to run Firebase.initializeApp(), but I'd like to know if it that method won't work if the phone is not online

It does not require a network connection. It is just establishing configuration for Firebase SDKs. Those SDKs will require network.

Related

Use Firebase-functions-emulator with remote firebase services

Can I connect the firebase-functions-emulator with the remote authentication and firestore service? Currently it is connecting only to the other local emulators. I don't want to setup my db locally.
It's not possible to have the local Cloud Functions emulator respond to (or "trigger" on) events in a production database. You have to deploy your functions in order for them to execute in response to change in the cloud-hosted database. The local functions emulator only responds to changes in the locally emulated database.
Refer the following to understand how to Connect your app to the Realtime Database Emulator
Check a similar example here.

Do I have to enable Firebase if I want to connect to my Cloud Firestore database from outside of Google cloud products?

Till now I was using service account to connect to my Firestore database (Firebase is not enabled) from within Google products like Cloud Functions or Colab.
Now I need to connect to Firestore from html page opened in my browser. Is it possible without enabling Firebase?
Yes, the Google Cloud Firestore NodeJS SDK is meant to be used on server side only. You can use Firebase Web SDK along with Firebase Authentication and Firebase Security Rules to support serverless app architectures where clients connect directly to your Firestore database.
You don't necessarily have to use Firebase Auth. However, it might be a good idea to restrict access and allow only public content to be accessible without authentication.
You can follow the quickstart in the documentation to setup the client SDK.

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.

Are Cloud Messaging Topics Shared Across Firebase Projects?

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

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.

Resources