I managed to go through the complete Firebase Android Codelab without too much problem, the app works perfectly. Now I would like to add device-to-device notifications. I found this tutorial: And some things are not clear to me.
var serviceAccount = require("path/to/serviceAccountKey.json");
What is the "ServiceAccountKey.json" file? Is it just another name for google-services.json? If not, what is this?
serviceAccountKey.json is not the actual file name However, it's just a place-holder name. The file is generated with a unique name from the Google Web UI, and that is the file to apply where the place-holder is referenced.
In the blog post you're following, we're running the node.js script on Google Cloud's App Engine Flexible Environment using the Firebase Admin SDK. A service account is a way to give trusted processes access to Google Cloud Platform and Firebase resources.
You create a service account through the Google Cloud Console and then download the corresponding JSON file. The code in the blog post looks for that file and use it to initialize the Firebase Admin SDK.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With