π§ Early Development Notice
This plugin is in a very early stage of development. Expect breaking changes and limited functionality while the API is being stabilized. Use in production at your own risk.
A Flutter plugin for integrating Dimelo (RingCentral Engage Digital Messaging) SDKs on Android and iOS platforms.
This is an unofficial Flutter plugin for Dimelo/RingCentral Engage Digital Messaging. It is not officially supported or maintained by RingCentral or Dimelo.
- Official Dimelo Documentation: https://mobile-messaging.dimelo.com/
- Official iOS SDK: Available through CocoaPods
- Official Android SDK: Available through Gradle
This plugin provides a Flutter wrapper around the native Dimelo SDKs to enable in-app messaging functionality in Flutter applications.
- π Cross-platform support (Android & iOS)
- π¬ In-app messaging integration
- π€ User authentication and management
- π Push notification support
- π¨ Customizable UI components
- π± Native SDK integration
Add this to your package's pubspec.yaml file:
dependencies:
dimelo_flutter: ^0.1.7Then run:
flutter pub getimport 'package:dimelo_flutter/dimelo_flutter.dart';
final dimelo = DimeloFlutter();
// Initialize with your API credentials
await dimelo.initialize(
apiKey: 'YOUR_API_KEY',
domain: 'YOUR_DOMAIN',
);// Set user details for authentication
await dimelo.setUser(
userId: 'user123',
name: 'John Doe',
email: '[email protected]',
phone: '+1234567890',
);// Display the messaging interface
await dimelo.showMessenger();-
Minimum SDK: API level 24+ (Android 7.0)
-
Add repositories to
android/build.gradle(project level):
allprojects {
repositories {
google()
mavenCentral()
// Add Dimelo repositories
maven { url 'https://raw.github.com/ringcentral/engage-digital-messaging-android/master' }
maven { url 'https://raw.github.com/ringcentral/engage-digital-messaging-android-location/master' }
maven { url 'https://raw.github.com/dimelo/Dimelo-Android/master' }
}
}- Add dependencies to
android/app/build.gradle(app level):
dependencies {
// Dimelo Android SDKs
implementation 'com.dimelo.dimelosdk:dimelosdk:3.3.9'
implementation 'com.ringcentral.edmessagingmapssdk:edmessagingmapssdk:1.0.1'
// Required by Dimelo Chat UI
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
}- Add permissions to
android/app/src/main/AndroidManifest.xml:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />- Important: Ensure your app's
android/app/build.gradlehas compatible versions:
android {
compileSdk 34
minSdk 24
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
}Note: This plugin requires the Dimelo native SDKs to be properly configured in your host app. The plugin provides Flutter bindings but the actual messaging functionality depends on the native SDKs being correctly set up.
- Minimum iOS: 13.0+
- Add to
ios/Podfile:
pod 'Dimelo-iOS', '~> VERSION'- Run pod install:
cd ios && pod install- Add to
ios/Runner/Info.plist:
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>| Method | Description | Parameters |
|---|---|---|
initialize() |
Initialize the Dimelo SDK | apiKey, domain, userId, developmentApns (optional) |
setUser() |
Set user information | userId, name, email, phone |
showMessenger() |
Display messaging interface | None |
logout() |
Logout current user | None |
isAvailable() |
Check if messaging is available | None |
getUnreadCount() |
Get count of unread messages | None |
setAuthInfo() |
Set authentication information | Map<String, String> info |
setDeviceToken() |
Set device push token | String token |
handlePush() |
Handle incoming push notification | Map<String, String> payload |
import 'package:dimelo_flutter/dimelo_flutter.dart';
class MessagingService {
final DimeloFlutter _dimelo = DimeloFlutter();
Future<void> initializeMessaging() async {
try {
// Initialize the SDK
await _dimelo.initialize(
apiKey: 'your-api-key',
domain: 'your-domain.dimelo.com',
);
// Set user information
await _dimelo.setUser(
userId: 'user123',
name: 'John Doe',
email: '[email protected]',
);
print('Dimelo initialized successfully');
} catch (e) {
print('Failed to initialize Dimelo: $e');
}
}
Future<void> openMessaging() async {
if (await _dimelo.isAvailable()) {
await _dimelo.showMessenger();
} else {
print('Messaging is not available');
}
}
Future<void> checkUnreadMessages() async {
try {
final unreadCount = await _dimelo.getUnreadCount();
print('Unread messages: $unreadCount');
// Update UI badge or notification
if (unreadCount > 0) {
// Show badge or notification
print('You have $unreadCount unread messages');
}
} catch (e) {
print('Failed to get unread count: $e');
}
}
Future<void> logout() async {
await _dimelo.logout();
}
}- Flutter: >=3.29.0
- Dart: >=3.5.0
- Android: API level 24+ (Android 7.0)
- iOS: 13.0+
To use this plugin, you'll need:
- Dimelo Account: Sign up at Dimelo
- API Key: Obtain from your Dimelo dashboard
- Domain: Your Dimelo domain (e.g.,
yourcompany.dimelo.com)
- SDK Not Initialized: Ensure you call
initialize()before any other methods - Platform Setup: Verify native SDK dependencies are properly configured
- Permissions: Check that required permissions are granted on both platforms
Enable debug logging by setting the debug flag:
await dimelo.initialize(
apiKey: 'your-api-key',
domain: 'your-domain',
debug: true, // Enable debug logging
);This is an unofficial plugin. Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This plugin is not officially supported by RingCentral or Dimelo. Use at your own risk. For official support, please refer to the official Dimelo documentation.
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: GitHub Issues
- Documentation: Official Dimelo Docs
- Flutter: Flutter Documentation
Note: This plugin requires proper setup of native Dimelo SDKs on both Android and iOS platforms. Please refer to the official Dimelo documentation for detailed integration instructions.