Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 6
Next »
How to enable Firebase server on IM App:
- Go to Settings in IM App on AdminCP and select "Firebase" at setting Select chat server
![](/download/attachments/5014054/Screen%20Shot%202019-05-29%20at%2017.31.30.png?version=1&modificationDate=1565090692000&api=v2)
- Add Firebase Config Object (Required)
- Add Algolia App ID (Optional) and Algolia API Key (Optional) to support search messages
Setup Firebase App:
1. Add Firebase project
- Go to Firebase console
- Select Add Project if you don't have one
![](/download/attachments/5014054/Screen%20Shot%202019-05-29%20at%2017.36.25.png?version=1&modificationDate=1565090692000&api=v2)
- Go to App Dashboard, select Project Overview > Project settings
![](/download/attachments/5014054/Screen%20Shot%202019-05-29%20at%2017.39.10.png?version=1&modificationDate=1565090692000&api=v2)
- In Your apps section click on icon </> to Add Firebase to web app
![](/download/attachments/5014054/Screen%20Shot%202019-05-29%20at%2017.36.25.png?version=1&modificationDate=1565090692000&api=v2)
- Add App nickname, then click Register App, then click Continue to console to back to Project Settings page
![](/download/attachments/5014054/Screen%20Shot%202019-05-29%20at%2017.45.04.png?version=1&modificationDate=1565090693000&api=v2)
- In Your Apps section, chose the app you just created, then click on Config and copy all scripts code on it.
- Paste to setting Firebase Config Object in IM App.
![](/download/attachments/5014054/Screen%20Shot%202019-05-29%20at%2017.49.54.png?version=1&modificationDate=1565090693000&api=v2)
2. Enable Firebase Database
- Back to Firebase App Dashboard, select Develop > Database.
- On the section right click on Create Database.
- Select mode and click Enable
![](/download/attachments/5014054/Screen%20Shot%202019-05-29%20at%2017.54.14.png?version=1&modificationDate=1565090693000&api=v2)
- After enable, you will redirect to database page.
- In that page, select tab Indexes and add 2 Composite indexes to Database by click on Create index manually.
- Setting like 2 below screenshot:
![](/download/attachments/5014054/Screen%20Shot%202019-05-29%20at%2018.03.07.png?version=1&modificationDate=1565090694000&api=v2)
- Indexes enable:
![](/download/attachments/5014054/Screen%20Shot%202019-05-29%20at%2018.05.18.png?version=1&modificationDate=1565090694000&api=v2)
- You must enable Sign-in method Email/Password in your project Authentication to allow users access to the database, follow screenshot:
![](/download/attachments/5014054/Screen%20Shot%202019-06-13%20at%2015.29.03.png?version=1&modificationDate=1565090695000&api=v2)
- Then, go to Database > Rules tab and set up database rules like:
![](/download/attachments/5014054/Screen%20Shot%202019-06-14%20at%2010.50.46.png?version=1&modificationDate=1565090695000&api=v2)
Now, you can start to use IM App with Firebase.
Setup Algolia to support search messages
Note: Without Algolia configure on IM App, users can only search for messages with prefix and case sensitive. |
---|
- Go to Algolia App Manage, sign up if you don't have an account
- Algolia is pay to use, so you should check their pricing at Algolia Pricing
- Go to your app Dashboard
![](/download/attachments/5014054/Screen%20Shot%202019-05-29%20at%2018.16.22.png?version=1&modificationDate=1565090694000&api=v2)
- Select Indices, create new Index with name im_chat
![](/download/attachments/5014054/Screen%20Shot%202019-05-29%20at%2018.18.05.png?version=1&modificationDate=1565090694000&api=v2)
- After Create Index, select menu API keys on left
- Copy Application ID and paste to setting Algolia App ID on IM App
- Copy Admin API Key and paste to setting Admin API Key on IM App
![](/download/attachments/5014054/Screen%20Shot%202019-05-29%20at%2018.24.52.png?version=1&modificationDate=1565090695000&api=v2)
Now, users can search full-text messages with IM App and Firebase