MuhammadDaniyal32 / Linphone-Flutter-Plugin

MIT License
4 stars 1 forks source link

Linphone Flutter Plugin

linkedin

Linphone Flutter Plugin is a Flutter plugin that allows you to integrate Linphone SDK's native Android calling functionalities into your Flutter application. This plugin is designed for VOIP calling using the UDP protocol, making it ideal for real-time voice communication in your app.

Features

Installation

To use this plugin, add linphone_flutter_plugin as a dependency in your pubspec.yaml file:

Usage

<manifest...>
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.SYSTEM_CAMERA" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_CAMERA" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL" />
    <uses-permission android:name="android.permission.MANAGE_OWN_CALLS" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />
    <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
</manifest>

Initialize the Plugin

Future initLinphone() async { await _linphoneSdkPlugin.requestPermissions(); }

### Login
- To start using Linphone, you need to log in with your SIP credentials.

```dart
Future<void> login({
  required String username,
  required String password,
  required String domain,
}) async {
  await _linphoneSdkPlugin.login(userName: username, domain: domain, password: password);
}

Make a Call

Hang Up

Example

Check out the example directory for a complete example of how to use this plugin.

Contributing

Contributions are welcome! Please submit issues and pull requests to help improve the plugin.

License

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