Mirrorfly UIKit Sdk is a set of prebuilt UI components that allows you to easily integrate an in-app chat with all the essential messaging features. Our development kit includes light and dark themes, text fonts, colors and more. You can customize these components to create an interactive messaging unique interface.
The requirements for chat SDK for Android are:
- Android Marshmallow 6.0 (API Level 23) or above
- Java 8 or higher
- Gradle 4.1.0 or higher
Before integrating CONTUS MirrorFly Chat SDK, you need to have a SDK license key for your MirrorFly application. This SDK needs to be authenticated by the MirrorFly server using the license key for further processing.
Follow the below steps to get your license key:
Step 1: Let’s Create an Account - Sign up into MirrorFly Console page (https://console.mirrorfly.com/register) for free MirrorFly account
Step 2: Create an account with your basic details including your name, organization details, work email, and contact number
Step 3: Once you’re in! You get access to your MirrorFly account ‘Overview page’ where you can find a license key as well as downloadable Android SDK for further integration process
Step 4: To download the AAR files from the Android SDKs, click on ‘Download’ which will take you to the top of the guided documentation page, here, click on the ‘Download button’ and extract the AAR files from the ZIP folder
Step 5: Once finished with the download, now it's time to start with the integration process that begins with creating a new project to develop a chat app.
As soon as the AAR files have been imported from the zip file using Kotlin, you can start over with the integration process.
Step 1: Create a new project or Open an existing project in Android Studio
Step 2: Add the following libraries in app/libs folder in the project
Step 3: Add the below code in the app/build.gradle file.
Note : In case "The 'kotlin-android-extensions' Gradle plugin is no longer supported" then remove the 'kotlin-android-extensions' from app/build.gradle plugins".
Step 4: Add the below code in the settings.gradle file.
Step 5: Add the following dependencies in the app/build.gradle file.
Step 6: Add the below dependencies required by the SDK in the app/build.gradle file.
Step 7: Add the below dependencies required by the SDK in the app module/build.gradle file.
Step 8: Add the below line in the gradle.properties file, to avoid imported library conflicts.
Step 9: Open the AndroidManifest.xml and add below permissions.
To integrate and run Mirrorfly UIKit in your app, you need to initialize it first. You can initialize the MirrorFlyUIKit instance by passing the MirrorFlyUIKitAdapter instance as an argument to a parameter in the MirrorFlyUIKit.init() method. The MirrorFlyUIKit.init() must be called once in the onCreate() method of your app’s Application instance.
Then provide your
isCallEnabled = false and If you have subscription set
isTrialLicenceKey true else set
LICENCE_KEY can be obtained from 'Overview' section from the Console dashboard.
|YOUR_APP_NAME||set your application name|
|YOUR_APPLICATION_ID||set your application id|
|YOUR_BASE_URL||set your base url|
|YOUR_LICENCE_KEY||set your licence key|
|YOUR_GOOGLE_TRANSLATION_KEY||set your Translation key|
|isTrialLicenceKey||set true or false|
|isContactEnable||set true or false|
|isCallEnabled||set true or false|
|isGroupEnable||set true or false|
|isOwnProfileEnable||set true or false|
|isOtherProfileEnable||set true or false|
Add the created BaseApplication to AndroidManifest.xml.
Note : Use the "Theme.MaterialComponents.DayNight.NoActionBar" in the style.xml or themes.xml to avoid the app bar in the call screen.
The below method to register a user.
Unless you log out the session, make a note that should never call the registration method more than once in an application.
Note : Use the Mirrorfly UIKIt SDK registration function after your application login process.
|USER_IDENTIFIER||Unique Id to Register the User|
|FIREBASE TOKEN||Firebase Token for Message and Call Push Notification|
DashBoardActivity is the starting point for launching UIKit in your application. By implementing the code below, you will see a complete list of recent chats that you're made with single and group conversation.
Note : Use
DashBoardActivityonly when you have done the registration.
You can now run the application on an emulator or a plugged-in device. To send a message, you must first start a conversation by clicking on the icon in the top-right corner. Then, you can select the user you wish to chat. Once navigated to user chat screen, type your first message and press send.