Live Interactive Demo - Real-time Communication for Mobile
Click to pick a file (max 512 KB)
Streamed over the channel in 16 KB chunks// Initialize OddSockets Flutter SDK
final client = OddSocketsClient.instance;
await client.initialize(ConnectionConfig(
apiKey: 'your-api-key',
userId: 'user-123',
enableBackgroundSync: true,
enablePushNotifications: true,
));
// Connect and join channel
await client.connect();
await client.joinChannel('general');
// Listen for messages
client.messageStream.listen((message) {
setState(() {
messages.add(message);
});
});
// Send message
await client.sendMessage('general', 'Hello!');
The OddSockets Flutter SDK provides everything you need for real-time communication in mobile apps.