Overview
The share invite feature:- Generates a shareable meeting link with session ID
- Opens the native share sheet (Android and iOS)
- Works with any app that supports text sharing
- Can be triggered from the default button or custom UI
Prerequisites
- CometChat Calls SDK integrated (Setup)
- Active call session (Join Session)
share_pluspackage (or equivalent) for native sharing
Step 1: Enable Share Button
Configure session settings to show the share invite button:Step 2: Handle Share Button Click
Listen for the share button click usingButtonClickListener:
Step 3: Generate and Share Link
Create the meeting invite URL and open the share sheet using theshare_plus package:
Custom Share Message
Customize the share message with more details:Deep Link Handling
To allow users to join directly from the shared link, implement deep link handling in your Flutter app.Configure Deep Links
Add deep link configuration for both platforms: Android — Add intent filters toandroid/app/src/main/AndroidManifest.xml:
ios/Runner/Info.plist:
Handle Deep Link in Flutter
Custom Share Button
If you want to use a custom share button instead of the default one, hide the default button and implement your own:Complete Example
Related Documentation
- Button Click Listener - Handle button clicks
- SessionSettingsBuilder - Configure share button visibility
- Join Session - Join a call session