Skip to main content

What is WuKongEasySDK

WuKongEasySDK is a lightweight instant messaging SDK series designed for rapid integration. It provides unified API design across platforms, enabling developers to add real-time chat functionality to any application in just 5 minutes.
Design Philosophy: Simplify integration complexity, focus on core functionality, and provide out-of-the-box chat experience.

Core Advantages

🚀 Lightning Fast Integration

  • 5-Minute Setup: From installation to sending the first message takes only 5 minutes
  • Zero Configuration Start: Ready to use out of the box, no complex initialization configuration needed
  • Automated Processing: Built-in connection management, auto-reconnection, message synchronization mechanisms

📱 Full Platform Coverage

  • Web/JavaScript: Supports modern browsers (Chrome 60+, Firefox 55+, Safari 11+, Edge 79+)
  • iOS: Supports iOS 12.0 or higher, Xcode 12.0+, Swift 5.0+
  • Android: Supports Android 5.0 (API level 21) or higher, Kotlin 1.5.0+
  • Flutter: Supports Flutter 3.0.0 or higher, Dart 2.17.0+

💡 Unified Design

  • Consistent API: All platforms use the same method names and parameter structures
  • Modern Async Patterns: JavaScript Promise, Swift async/await, Kotlin coroutines, Dart async/await
  • Event-Driven Architecture: Unified event listening and handling mechanisms

Integration Process Overview

Cross-Platform Code Examples

Here are basic integration code examples for each platform, demonstrating WuKongEasySDK’s unified API design:
import { WKIM, WKIMChannelType, WKIMEvent } from 'easyjssdk';

// 1. Initialize SDK
const im = WKIM.init("ws://your-server.com:5200", {
    uid: "your_user_id",
    token: "your_auth_token"
});

// 2. Listen for messages
im.on(WKIMEvent.Message, (message) => {
    console.log("New message received:", message);
});

// 3. Connect to server
await im.connect();

// 4. Send message
const result = await im.send("friend_user_id", WKIMChannelType.Person, {
    type: 1,
    content: "Hello from Web!"
});
import WuKongEasySDK

// 1. Initialize SDK
let config = WuKongConfig(
    serverUrl: "ws://your-server.com:5200",
    uid: "your_user_id",
    token: "your_auth_token"
)
let easySDK = WuKongEasySDK(config: config)

// 2. Listen for messages
easySDK.onMessage { message in
    print("New message received:", message)
}

// 3. Connect to server
try await easySDK.connect()

// 4. Send message
let result = try await easySDK.send(
    to: "friend_user_id",
    channelType: .person,
    payload: MessagePayload(type: 1, content: "Hello from iOS!")
)
import com.githubim.easysdk.*

// 1. Initialize SDK
val config = WuKongConfig.Builder()
    .serverUrl("ws://your-server.com:5200")
    .uid("your_user_id")
    .token("your_auth_token")
    .build()
val easySDK = WuKongEasySDK.getInstance()
easySDK.init(this, config)

// 2. Listen for messages
easySDK.addEventListener(WuKongEvent.MESSAGE, object : WuKongEventListener<Message> {
    override fun onEvent(message: Message) {
        Log.d("WuKong", "New message received: $message")
    }
})

// 3. Connect to server
lifecycleScope.launch {
    easySDK.connect()
}

// 4. Send message
val result = easySDK.send(
    channelId = "friend_user_id",
    channelType = WuKongChannelType.PERSON,
    payload = MessagePayload(type = 1, content = "Hello from Android!")
)
import 'package:wukong_easy_sdk/wukong_easy_sdk.dart';

// 1. Initialize SDK
final config = WuKongConfig(
  serverUrl: "ws://your-server.com:5200",
  uid: "your_user_id",
  token: "your_auth_token",
);
final easySDK = WuKongEasySDK.getInstance();
await easySDK.init(config);

// 2. Listen for messages
easySDK.addEventListener(WuKongEvent.message, (Message message) {
  print("New message received: $message");
});

// 3. Connect to server
await easySDK.connect();

// 4. Send message
final result = await easySDK.send(
  channelId: "friend_user_id",
  channelType: WuKongChannelType.person,
  payload: MessagePayload(type: 1, content: "Hello from Flutter!"),
);
Unified Design: Notice that all platforms use the same method names (init, connect, send) and similar parameter structures, making cross-platform development easier.

Use Case Guidelines

  • Rapid Prototyping: Prototype projects that need to quickly validate chat functionality
  • MVP Projects: Minimum viable products for quick market validation
  • Simple Chat Applications: Chat applications with relatively simple feature requirements
  • Learning and Demos: Learning instant messaging development or product feature demonstrations
  • Internal Tools: Enterprise internal communication tools or customer service systems

Get Started Now

Choose your development platform and begin your 5-minute quick integration journey:

Web

Quick integration for web applications and H5 pages

iOS

Quick integration for iOS native applications

Android

Quick integration for Android native applications

Flutter

Quick integration for Flutter cross-platform applications
Selection Advice: If you’re unsure which platform to choose, we recommend starting with Web EasySDK as it can quickly validate functionality and is easy to debug.