Skip to main content

Overview

WuKongIM Android EasySDK is a lightweight Android SDK that enables you to add real-time chat functionality to your Android application in just 5 minutes. This guide will take you through the complete process from installation to sending your first message.
System Requirements: Android 5.0 (API level 21) or higher, Kotlin 1.5.0 or higher

Step 1: Install SDK

Choose any of the following methods to install Android EasySDK:

Step 2: Basic Integration

2.1 Import SDK

2.2 Initialize SDK

2.3 Listen for Events

2.4 Remove Event Listeners

In some cases, you may need to remove event listeners to avoid memory leaks or duplicate processing. Android EasySDK provides methods to remove listeners.
Important Reminder: In Android, removing event listeners requires maintaining references to the listeners. It’s recommended to use class properties to store listener references for later removal.

Correct Usage

2.5 Connect to Server

2.6 Send Messages

Step 3: Error Handling and Best Practices

3.1 Error Handling

Built-in Auto Reconnection: Android EasySDK has built-in intelligent reconnection mechanism, no need to manually implement reconnection logic. The SDK will automatically attempt to reconnect when the connection is lost.

Complete Example Code

View complete example code and more feature demonstrations

Complete Protocol Documentation

View WuKongIM’s complete protocol documentation

GitHub Repository

Visit EasyJSSDK’s GitHub repository

Issue Feedback

Report issues or provide suggestions

Next Steps

Congratulations! You have successfully integrated WuKongIM Android EasySDK. Now you can:
  1. Extend Functionality: Add group chat, file transfer and other features
  2. Customize UI: Customize chat interface according to your app design
  3. Integrate into Project: Integrate chat functionality into your existing project
  4. Performance Optimization: Optimize performance based on actual usage
If you need more complex functionality or higher performance requirements, consider using the full version of WuKongIMSDK.