FCM (Firebase Cloud Messaging)
Firebase Cloud Messaging is a free Push service created by Google. We use this service to send push messages to the devices running the Parley SDKs (web, android, ios).
By default the apps will use our FCM project for handling push messages, it is possible however to use your own project.
Create FCM Project
You can skip this step if you've already created a project
To make use of FCM you first need to create a "FCM Project". You can do so by following this url and logging in: console.firebase.google.com
After you've created a new project by clicking on the "new project" button and giving it a name (Google analytics are optional), you will be directed to your Dashboard.
Create Service account
In your Dashboard, click on the "settings" button in the top-left menu and click on "projectsettings".
Navigate to the "Serviceaccounts" tab and click on the "Generate private key" button at the bottom of the section. Click
on "generate key" and you will receive a .json file containing information about your FCM project.
Pack this file in an encrypted zip-file and send it to us via support@parley.nu.
We will then setup your Parley account to make use of your FCM project when sending push messages.
For a front-end implementation of FCM (to receive the push messages), you should follow the FCM documentation at: firebase docs
Service account permissions
By default this service account has more permissions than necessary, to change this go to firebase service accounts here you can manage your service accounts.
First we need to define a custom role for this service account, go
to firebase service account roles and create a new role.
The only permission we need is the cloudmessaging.messages.create permission, so make sure you add that to the new
role.
Next go to firebase iam and click the pencil icon to edit the service account. Choose your new role and save.
Connect the web library to the FCM project
This is only needed if you are using our web library
Once Parley has access to your project, you can change the web library settings to match your fcm project. Please refer to FCM config