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: You can copy the license key from the ‘Application info’ section
Step 5: 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 6: 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.
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.
Add the created BaseApplication to AndroidManifest.xml.
FlyRecentChatActivity 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.
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.