Introduction to Chat21 Android SDK
Chat21 forms the core of the open-source live chat platform known as Tiledesk.com. The Chat21 Android SDK empowers developers to integrate rich messaging capabilities into their Android applications. With a plethora of features, it is designed to enhance user experience by enabling intuitive communication tools and functionalities.
Features of Chat21 Android SDK
The Chat21 Android SDK is feature-rich, providing several key functionalities:
-
Direct Messaging: Users can send direct messages to each other, facilitating personal and one-to-one communication.
-
Emoji Support: Enhance conversations by including emojis, adding an expressive element to messaging.
-
Picture Attachment: Users can attach and share pictures in their chats with ease.
-
Group Chat: Create and manage group chats for collaborative discussions among multiple users.
-
Messages History: Users can view their message history, keeping track of past conversations.
-
Group List View: Easily view a list of group chats that a user is part of.
-
Read Receipts: Users are informed when their message has been sent, delivered, and read by the recipient, ensuring effective communication.
-
Conversations List View: Similar to popular messaging apps like WhatsApp, users can see a list of conversations with the last messages sent.
-
Presence Manager: Users can see when someone is online or offline and the duration of their inactivity.
-
User Profile: Allows viewing full names and emails of users, and supports login and signup using Firebase email and password authentication.
-
Contacts List: A view that enables a full-text search for user contacts based on the fullname field.
Sample Demonstrations
The SDK comes with a demo app that visually showcases its capabilities. Developers can easily access this demo application from Google Play. Moreover, the demo app's source code is openly available on GitHub, enabling developers to explore and modify the features to meet their own needs.
Prerequisites for Setup
To use the Chat21 Android SDK, some prerequisites must be in place:
- A Firebase project must be set up and configured.
- Chat21 Firebase cloud functions should be installed as per detailed instructions.
- The google-services.json file must be included in the app, with comprehensive guidance provided in the official documentation.
Integration with Firebase
Chat21 SDK makes extensive use of Firebase libraries. To integrate these, developers need to add dependencies such as Google's Maven repository and the google-services plugin to their project's build scripts.
Build Script Modifications
In the project/build.gradle
, developers need to:
- Include the google-services plugin.
- Add the Google’s Maven repository.
Application of Gradle Plugin
In the app/module build.gradle
file, developers should:
- Apply the Google services plugin.
- Configure dependencies for multiDex and necessary support libraries.
Installation of Chat21 Libraries
The SDK requires setting the minimum SDK version to API 19 and the target SDK version to API 22. Developers need to add necessary dependencies including Chat21 libraries to their app's build.gradle
.
Application Modifications
Developers will implement a custom Application class to manage multiDex and add it to the Manifest.xml
. They also need to set a specific theme in the styles.xml
.
Initializing Chat21 SDK
The Chat21 SDK involves initializing the ChatManager
with a custom configuration that sets up necessary parameters like Firebase database URLs and storage bucket information. Furthermore, the ChatUI
component can be initialized to manage UI elements seamlessly, allowing the app to handle conversations either in an activity or through fragments.
Addressing Common Issues
Developers might encounter common integration issues related to support library conflicts, MultiDex handling, and application theme settings. The SDK documentation provides solutions and troubleshooting steps for these common problems.
Deploying to JCenter
For developers interested in deploying their own library version to JCenter, a detailed guide is provided to assist in the process.
In summary, Chat21 Android SDK is a comprehensive tool that provides all necessary features to build a robust messaging application with Firebase as its backbone. Its extensive features, clear setup instructions, and open-source nature make it an ideal choice for developers looking to integrate chat functionalities into their apps.