Through our Chat SDK for Android, you can efficiently integrate real-time chat into your app. On the client-side implementation, you can initialize, configure and build the chat with minimal effort.
On the server-side, MirrorFly ensures reliable infra-management services for your chat within the app. All server setup related documents can be downloaded from control panel's download section. This and Initialization page provide the Chat SDK’s structure and installation steps, then goes through the preliminary steps of implementing the Chat SDK in your own project.
Note : The fastest way to see our Chat SDK in action is to build your chat app on top of our sample app. Make sure to change the application ID of the sample app to your own. To download sample app click here
The minimum requirements for Chat SDK for Android are:
- Android Lollipop 5.0 (API Level 21) or above
- Java 7 or higher
- Gradle 4.1.0 or higher
Firebase authentication and other google services like translate API are not part MirrorFly SDK, you will be charged based on the usage by google. To use free quota credit details must be updated in goole payments. To know more about plans and pricing click here
Your SDK must be authenticated by MirrorFly server using License Key.
Please follow below step to get your license key:
Step 1: Create an account here in MirrorFly console, if you already have an account please goto step 3.
Step 2: Validate your account by following the steps provided in console and login to your account.
Step 3: Please login to your account here
Step 4: Copy license key under "Application info" in "Overview" page
The SDK is already compiled into an AAR file. To use the SDK, the below AAR file has to be imported into the project. Chat sdk needs kotlin support in your project.
Step 1: Download the latest SDK from MirrorFly Control Panel Download's section
Step 2: Extract the files from downloaded zip file
Step 3: Create a new Android project or Open a existing project
Step 4: Add the following libraries in app/libs folder in the project
Step 5: Add the following dependencies in app/build.gradle file.
Step 6: Add the below dependencies required by the SDk in app/build.gradle
Step 7: Add the below code in the app level build.gradle:
Step 8: Open the AndroidManifest.xml and add below permissions.
The below table contains some mostly used keywords in sdk with their explanation
|userID/userBareID||Unique ID assigned for each user Ex: 12345678 (any alphanumeric). The below characters is not allowed in userId: U+0022 (") U+0026 (&) U+0027 (') U+002F (/) U+003A (:) U+003C (<) U+003E (>) U+0040 (@) userID should follow below specification: https://xmpp.org/extensions/xep-0106.html|
|userJid (or) JID||userID+@+domain of the chat server Ex. firstname.lastname@example.org|
|groupID/groupBareID||Unique ID assigned for each group Ex: group123456 (any alphanumeric). GroupJID = groupID +@mix.+domain of the chat server Ex: email@example.com`|
Sdk is having a built-in functions to prepare the JID, Group JID. :::