acs_flutter_sdk 0.1.4 copy "acs_flutter_sdk: ^0.1.4" to clipboard
acs_flutter_sdk: ^0.1.4 copied to clipboard

Flutter SDK for Azure Communication Services. Video calling, voice chat, messaging, and Teams meeting integration for Android & iOS.

Azure Communication Services Flutter SDK (ACS) #

Official Flutter SDK for Microsoft Azure Communication Services - Build real-time video calling, voice chat, and messaging applications with enterprise-grade WebRTC technology. Seamlessly integrate Teams meetings, group calls, and cross-platform communication into your Flutter apps for Android and iOS.

pub package License: MIT Platform

What is Azure Communication Services? #

Azure Communication Services (ACS) is Microsoft's cloud-based platform for adding real-time communication capabilities to your applications. This Flutter SDK provides native bindings to ACS, enabling developers to build production-ready video calling, voice chat, and messaging features with minimal code.

Key Features #

πŸŽ₯ Real-Time Video & Voice Calling #

  • βœ… WebRTC-powered video calls: High-quality peer-to-peer and group video calling
  • βœ… Voice calling (VoIP): Crystal-clear audio communication with mute/unmute controls
  • βœ… Camera controls: Switch between front/back cameras, start/stop video streams
  • βœ… Native video rendering: Platform-optimized video views for Android and iOS

πŸ’¬ Real-Time Chat & Messaging #

  • βœ… Thread-based messaging: Create and join chat threads with multiple participants
  • βœ… Message history: Retrieve and display conversation history
  • βœ… Typing indicators: Real-time typing notifications
  • βœ… Event streams: Subscribe to real-time message events

πŸ” Enterprise-Grade Security #

  • βœ… Token-based authentication: Secure access token initialization for ACS SDKs
  • βœ… Identity management: User identity creation and token management (development helpers included)
  • βœ… Backend integration: Production-ready architecture with server-side token generation

🀝 Microsoft Teams Integration #

  • βœ… Teams meeting interoperability: Join Microsoft 365 Teams meetings directly from Flutter
  • βœ… Meeting link support: One-click join with Teams meeting URLs
  • βœ… Work/school account support: Seamless integration with organizational Teams accounts

πŸ“± Cross-Platform Support #

  • βœ… Android: Full support for Android 7.0+ (API 24+)
  • βœ… iOS: Complete iOS 13.0+ compatibility
  • βœ… Consistent API: Write once, run on both platforms with identical code

Platform Support #

Platform Supported Minimum Version
Android βœ… API 24 (Android 7.0)
iOS βœ… iOS 13.0+

Getting Started with Flutter ACS SDK #

Installation #

Add the Azure Communication Services Flutter SDK to your package's pubspec.yaml file:

dependencies:
  acs_flutter_sdk: ^0.1.3

Then run:

flutter pub get

Platform Setup #

Android

Add the following permissions to your android/app/src/main/AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Ensure your android/app/build.gradle has minimum SDK version 24:

android {
    defaultConfig {
        minSdkVersion 24
    }
}

iOS

Add the following to your ios/Runner/Info.plist:

<key>NSCameraUsageDescription</key>
<string>This app needs camera access for video calls</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app needs microphone access for calls</string>

Ensure your ios/Podfile has minimum iOS version 13.0:

platform :ios, '13.0'

Usage Examples #

Quick Start - Initialize the Flutter SDK #

import 'package:acs_flutter_sdk/acs_flutter_sdk.dart';

// Initialize the Azure Communication Services SDK
final sdk = AcsFlutterSdk();

Identity Management #

ℹ️ Production guidance: ACS identity creation and token issuance must happen on a secure backend. The plugin only exposes a lightweight initialization helper so the native SDKs can be configured during development.

// Create an identity client
final identityClient = sdk.createIdentityClient();

// Initialize with your connection string (local development only)
await identityClient.initialize('your-connection-string');

// For production:
// 1. Your app requests a token from your backend.
// 2. The backend uses an ACS Communication Identity SDK to create users and tokens.
// 3. The backend returns the short-lived token to your app.
// 4. The app passes the token into the calling/chat clients shown below.

Real-Time Video & Voice Calling with WebRTC #

Build production-ready video calling and VoIP features in your Flutter app:

// Create a calling client for video/voice calls
final callingClient = sdk.createCallClient();

// Initialize with an access token (obtained from your secure backend)
await callingClient.initialize('your-access-token');

// Request camera/microphone permissions before starting video calls
await callingClient.requestPermissions();

// Start a video call to one or more participants (group calling)
final call = await callingClient.startCall(
  ['user-id-1', 'user-id-2'],
  withVideo: true,  // Enable video for video calling
);

// Join an existing group call or conference
final joined = await callingClient.joinCall('group-call-id', withVideo: true);

// Join a Microsoft Teams meeting using the meeting link (Teams interoperability)
final teamsCall = await callingClient.joinTeamsMeeting(
  'https://teams.microsoft.com/l/meetup-join/...',
  withVideo: false,  // Audio-only Teams meeting
);

Perfect forward secrecy note? does not exist? no.


// Mute/unmute audio
await callingClient.muteAudio();
await callingClient.unmuteAudio();

// Start/stop local video and switch cameras
await callingClient.startVideo();
await callingClient.switchCamera();
await callingClient.stopVideo();

// Invite or remove participants during an active call
await callingClient.addParticipants(['user-id-3']);
await callingClient.removeParticipants(['user-id-2']);

// End the call
await callingClient.endCall();

// Listen to call state changes
callingClient.callStateStream.listen((state) {
  print('Call state: $state');
});

Embed the platform-rendered video views in your widget tree:

const SizedBox(height: 160, child: AcsLocalVideoView());
const SizedBox(height: 240, child: AcsRemoteVideoView());

Joining Teams Meetings

  • Call initialize with a valid ACS access token before attempting to join. Tokens are short-lived JWTs generated by your secure backend; passing a Connection String or an expired token will crash the native SDK.
  • Only Microsoft 365 (work or school) Teams meetings are supported. Consumer β€œTeams for Life” meetings are not currently interoperable and will return Teams for life meeting join not supported.
  • Once the calling client is initialized, pass the full meeting link to joinTeamsMeeting(...). You can opt in to start with local video by setting withVideo: true.

Real-Time Chat & Messaging #

Add instant messaging and chat functionality to your Flutter application:

// Create a chat client for real-time messaging
final chatClient = sdk.createChatClient();

// Initialize with an access token and Azure Communication Services endpoint
await chatClient.initialize(
  'your-access-token',
  endpoint: 'https://<RESOURCE>.communication.azure.com',
);

// Create a new chat thread (group chat)
final thread = await chatClient.createChatThread(
  'My Chat Thread',
  ['user-id-1', 'user-id-2'],  // Add participants to the chat
);

// Join an existing chat thread
final thread = await chatClient.joinChatThread('thread-id');

// Send a text message to the chat thread
final messageId = await chatClient.sendMessage(
  thread.id,
  'Hello, world!',
);

// Get message history from a thread
final messages = await chatClient.getMessages(thread.id, maxMessages: 50);

// Send typing notification (real-time indicator)
await chatClient.sendTypingNotification(thread.id);

// Subscribe to real-time message events
// (Preview) Realtime event streams will be enhanced in future releases
chatClient.messageStream.listen((message) {
  print('New message: ${message.content}');
});

Architecture #

This plugin uses Method Channels for communication between Flutter (Dart) and native platforms (Android/iOS):

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Flutter (Dart)              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚   AcsFlutterSdk             β”‚   β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚   β”‚
β”‚  β”‚  β”‚ AcsIdentityClient    β”‚   β”‚   β”‚
β”‚  β”‚  β”‚ AcsCallClient        β”‚   β”‚   β”‚
β”‚  β”‚  β”‚ AcsChatClient        β”‚   β”‚   β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚ Method Channel
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚      Native Platform Code           β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚  Android (Kotlin)           β”‚   β”‚
β”‚  β”‚  - ACS Calling SDK          β”‚   β”‚
β”‚  β”‚  - ACS Chat SDK             β”‚   β”‚
β”‚  β”‚  - ACS Common SDK           β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚  iOS (Swift)                β”‚   β”‚
β”‚  β”‚  - ACS Calling SDK          β”‚   β”‚
β”‚  β”‚  - ACS Chat SDK             β”‚   β”‚
β”‚  β”‚  - ACS Common SDK           β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Security Best Practices #

  1. Never expose connection strings in client apps: Connection strings should only be used server-side
  2. Implement token refresh: Access tokens expire and should be refreshed through your backend
  3. Use server-side identity management: Create users and generate tokens on your backend
  4. Validate permissions: Ensure users have appropriate permissions before granting access
  5. Secure token storage: Store tokens securely using platform-specific secure storage

Example App #

A complete example application is included in the example/ directory. To run it:

cd example
flutter run

Complete API Reference & Documentation #

For comprehensive API documentation, code examples, and detailed guides, visit:

Troubleshooting Common Issues #

Android Build Issues #

If you encounter build issues on Android:

  1. Minimum SDK Version: Ensure minSdkVersion is set to 24 or higher in android/app/build.gradle
  2. SDK Tools: Check that you have the latest Android SDK tools installed
  3. Clean Build: Run flutter clean && flutter pub get to clear cache
  4. Gradle Sync: Sync Gradle files in Android Studio

iOS Build Issues #

If you encounter build issues on iOS:

  1. Deployment Target: Ensure iOS deployment target is 13.0 or higher in ios/Podfile
  2. Pod Installation: Run pod install in the ios/ directory
  3. Clean Build: Run flutter clean && flutter pub get
  4. Xcode Cache: Clean build folder in Xcode (Cmd+Shift+K)

Camera & Microphone Permission Issues #

Ensure all required permissions are properly configured:

  • Android: Add permissions to AndroidManifest.xml (see Platform Setup section)
  • iOS: Add usage descriptions to Info.plist (see Platform Setup section)
  • Runtime Permissions: Request camera/microphone permissions at runtime before starting video calls
  • Permission Handler: Use permission_handler package for runtime permission requests

Teams Meeting Join Issues #

  • Ensure you're using a valid ACS access token (not a connection string)
  • Only Microsoft 365 (work/school) Teams meetings are supported
  • Consumer "Teams for Life" meetings are not currently supported

Contributing #

Contributions are welcome! Please read our Contributing Guide for details on our code of conduct and the process for submitting pull requests.

License #

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments #

Support & Community #

Get Help #

  • πŸ› Bug Reports & Feature Requests: GitHub Issues
  • πŸ“– Azure Communication Services Docs: Official Microsoft Documentation
  • πŸ’¬ Questions: Use GitHub Discussions or Stack Overflow with tags flutter, azure-communication-services, acs

Keywords & Tags #

Flutter SDK, Azure Communication Services, ACS, Microsoft, Video Calling, Voice Chat, VoIP, Real-time Communication, WebRTC, Teams Integration, Group Calling, Instant Messaging, Chat SDK, Cross-platform, Android, iOS, Real-time Messaging, Video Conferencing, Microsoft Teams Interoperability

0
likes
0
points
296
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter SDK for Azure Communication Services. Video calling, voice chat, messaging, and Teams meeting integration for Android & iOS.

Repository (GitHub)
View/report issues

Topics

#azure #video-calling #chat #teams #acs

Documentation

Documentation

License

unknown (license)

Dependencies

flutter, meta, plugin_platform_interface

More

Packages that depend on acs_flutter_sdk

Packages that implement acs_flutter_sdk