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.

ChatMessaging Module - Configuring Firebase Settings

Afterward, turn on Activate Chat. Go to https://firebase.google.com/ to fill in the fields that appear.

ChatMessaging Module - Configuring Firebase Settings

Click on the images to enlarge.

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.

Chat/Messaging Module - Configuring Firebase Settings

Click on the images to enlarge.

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. 

ChatMessaging Module - Configuring Firebase Settings

Click on the images to enlarge.

2- Once you have filled the Choose or create a Google Analytics account field, select your country from the section below.

ChatMessaging Module - Configuring Firebase Settings

Click on the images to enlarge.

ChatMessaging Module - Configuring Firebase Settings

Click on the images to enlarge.

Read and confirm the conditions for the three boxes below and click Create project button. If you do not want to activate Google Analytics, simply close the Enable Google Analytics for this project button from the first step and click the Create project button.

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

ChatMessaging Module - Configuring Firebase Settings

Click on the images to enlarge.

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

ChatMessaging Module - Configuring Firebase Settings

Click on the images to enlarge.

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

Chat/Messaging Module - Configuring Firebase Settings

Click on the images to enlarge.

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.

Chat/Messaging Module - Configuring Firebase Settings

From the left-hand tab,  under the Develop tab, select  Authentication. Select Email/Password from the Login Procedure field on the page that opens and activate the option at the top and click Save.

ChatMessaging Module - Configuring Firebase Settings

When you click the Save button, E-Mail/Password option will be activated.

Afterward, from the left-hand menu, under the Develop tab, select Database, and click the Create database button on the main screen. On the screen that appears, select Start in production mode and click the Next button. When you see the Cloud Firestore Location setting, do not change this option, it may remain as it appears and click Done button.

Chat/Messaging Module - Configuring Firebase Settings

Then click the Cloud Firestore button on this screen;

ChatMessaging Module - Configuring Firebase Settings

Click on the images to enlarge.

Click on the Realtime Database that two options appear on the screen.

ChatMessaging Module - Configuring Firebase Settings

Click on the images to enlarge.

Copy the URL on the screen that appears, this is the Firebase Database URL. Paste this link into the corresponding area in the Chat/Messaging module in the MobiRoller panel.

ChatMessaging Module - Configuring Firebase Settings

Click on the images to enlarge.

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

Chat/Messaging Module - Configuring Firebase Settings

Click on the images to enlarge.

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

{
  "rules": {
    ".read": "auth != null",
    ".write": "auth != null",
    "userListV1" : {
      ".indexOn": ["io","n","o"]
    },
    "searchIndexV1" : {
      ".indexOn": ["un","n"]
    }
  }
}
Chat/Messaging Module - Configuring Firebase Settings

Click on the images to enlarge.

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. 

Chat/Messaging Module - Configuring Firebase Settings

Click on the images to enlarge.

Copy and paste the Web API key on the screen that appears and paste it into the Web API key field in the Chat/Messaging module in the MobiRoller panel.

Chat/Messaging Module - Configuring Firebase Settings

Click on the images to enlarge.

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

Chat/Messaging Module-Configuring Firebase Settings

Click on the images to enlarge.

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 Server Key field in the Chat/Messaging module in the MobiRoller panel. Copy the Sender ID and add it to the Sender ID field in the Chat/Messaging module in the MobiRoller panel.

Chat/Messaging Module - Configuring Firebase Settings

Click on the images to enlarge.

You can add the Chat/Messaging module to your app by clicking on the Save button and use it in your app.

Chat/Messaging Module-Configuring Firebase Settings

Click on the images to enlarge.

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.

ChatMessaging Module-Configuring Firebase Settings

Click on the images to enlarge.

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].

ChatMessaging Module-Configuring Firebase Settings

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