Chat/Messaging Module – Configuring Firebase Settings

In order to activate the Chat/Messaging module in your app, you must perform the following steps completely.

Chat module is currently only available for Android apps.

On the Content tab, click the Enable button below the Chat/Messaging module.

ChatMessaging Module - Configuring Firebase Settings

Click on the images to enlarge.

You will see a warning message. You must activate the Chat/Messaging module in your app with Go to Membership Page option.

ChatMessaging Module - Configuring Firebase Settings

When you click Go to Membership page, activate Enable Login from the Login Settings page that opens. Then you will be able to see settings.

ChatMessaging Module - Configuring Firebase Settings

Click on the images to enlarge.

After activating the membership module, you must add the Membership Screen Logo and Membership Screen Background images.

Afterward, click on the Firebase Settings. Go to https://firebase.google.com/ to fill in the fields that appear.

If you don’t have a registered Gmail account, first of all, log in to your Gmail account. After logging in or if you already have a registered Gmail account, click the Go to Console button at the top right of the screen that appears.

ChatMessaging Module - Configuring Firebase Settings

Click on the images to enlarge.

Continue by clicking the Create a project button.

ChatMessaging Module - Configuring Firebase Settings

Click on the images to enlarge.

Type your app name in the Project Name field and click Continue.

Click the Continue button again on the screen that appears.

After that step, you can enable Google Analytics for your project. To enable Google Analytics to follow these steps:

1-Turn on the Enable Google Analytics for this project button then click Continue. 

2- After selecting the country, read the conditions below and confirm both boxes. Then click the Add Firebase button.

If you do not want to activate Google Analytics, simply turn off the Enable Google Analytics for this project button from the first step and click the Add Firebase button.

On this screen, click on the Continue button under Your new project is ready notification.

On the “Get started by adding Firebase to your app” screen, click the Android option and continue.

Type the Android package name you specified when you were creating your APK here. In the App nickname field, you can write the name of your application. For detailed information about the package name, you can read our relevant article by clicking What is the package name? 

If you want you can leave the other steps blank and click the Register app button. On the following screen, close the page without any action.

Please, click on ‘The Project Overview’ corners in the upper left part of the screen that appears. Then click for ‘Authentication’ from the tab opened at the bottom. Click the Get started button on the screen that appears.

Click the ‘Sign-in Method’ button from the menu that appears on your screen. Click to the ‘Email / Password’ field from the login providers on the screen that opens.

In the Email/Password section, activate the Enable option as in the picture and click the Save button.

 

Then select Realtime Database from the tab on the left and click the Create Database button on the main screen.

On the screen that appears, click the Next button without changing the United States (us-central1) option.

Check the Start in locked mode option and click the Enable button.

Copy the URL on the screen that appears, it’s the Firebase Database URL. Paste this into the corresponding field in Firebase Settings in the MobiRoller panel.

After pasting the link to the field on the MobiRoller panel, click the Rules button on the Firebase panel.

Delete the entire code snippet here, copy and paste the following code snippet here.

{
  "rules": {
    ".read": "auth != null",
    ".write": "auth != null",
    "userListV1" : {
      ".indexOn": ["io","n","o"]
    },
    "searchIndexV1" : {
      ".indexOn": ["un","n"]
    }
  }
}

If you have pasted the code properly it will look like below. After this process, click the Publish button.

If you return to the Database screen through the panel, the codes will be reset due to an error in Firebase and you will be receiving the error before you use your app. So after you paste and publish the code, go directly to the next step.

Afterward, click on the Settings button next to the Project Overview field on the left side to select the Project settings. 

Copy and paste the Web API key on the screen that appears and paste it into the Firebase Web API Key field in the Firebase Settings in the MobiRoller panel.

Furthermore, You must copy the App ID at the bottom of the page on the same screen and paste it into the Firebase App ID field in the Firebase Settings in the MobiRoller panel. 

As another step, click the Cloud Messaging tab at the top, copy the token portion of the Server Key and add it to the Firebase API Key field in the Firebase Settings in the MobiRoller panel. Copy the Sender ID and add it to the Firebase Sender ID field in the Firebase Settings in the MobiRoller panel.

After filling in the relevant fields, you can add the Chat/Messaging module to your application by clicking the Save button. But for it to work, you need to generate a new APK and update it if your application is live in any application market.

Any changes you make to your Chat/Messaging settings will be active with the new APK generation. Once you’ve completed your change, go to the Dashboard tab to create a new APK and control your app with your new APK.

If you think you’ve done all the steps correctly, but you keep getting this error;

From the same panel click Users and Permissions and after that click the Add Member button.

You need to give authority to [email protected] from the pop-up screen and send your e-mail with a screenshot of the error you received to [email protected].

As soon as we will examine your error and we will resolve it.