feat: upgrade linphone-sdk to 5.4.84 and add syncCurrentState
This commit is contained in:
parent
f29d9d42e5
commit
06a57d5c21
8 changed files with 36 additions and 3 deletions
|
|
@ -47,8 +47,19 @@ android {
|
||||||
minSdk = 24
|
minSdk = 24
|
||||||
}
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
name = "linphone.org maven repository"
|
||||||
|
url = uri("https://download.linphone.org/maven_repository")
|
||||||
|
content {
|
||||||
|
includeGroup("org.linphone")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(files("libs/linphone-sdk-android-5.2.0.aar"))
|
// implementation(files("libs/linphone-sdk-android-5.2.0.aar"))
|
||||||
|
implementation("org.linphone:linphone-sdk-android:5.4.84")
|
||||||
|
|
||||||
testImplementation("org.jetbrains.kotlin:kotlin-test")
|
testImplementation("org.jetbrains.kotlin:kotlin-test")
|
||||||
testImplementation("org.mockito:mockito-core:5.0.0")
|
testImplementation("org.mockito:mockito-core:5.0.0")
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -180,6 +180,11 @@ class LiblinphoneFlutterPlugin : FlutterPlugin, ActivityAware, MethodCallHandler
|
||||||
result.success(true)
|
result.success(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
"syncCurrentState" -> {
|
||||||
|
linphoneBridge.syncCurrentState()
|
||||||
|
result.success(true)
|
||||||
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
result.notImplemented()
|
result.notImplemented()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -335,6 +335,11 @@ class LinphoneBridge(
|
||||||
return currentCall != null
|
return currentCall != null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun syncCurrentState() {
|
||||||
|
onRegistrationStateChanged(registrationState.ordinal)
|
||||||
|
onCallStateChanged(callState.ordinal)
|
||||||
|
}
|
||||||
|
|
||||||
enum class CallType {
|
enum class CallType {
|
||||||
Audio,
|
Audio,
|
||||||
Video,
|
Video,
|
||||||
|
|
|
||||||
|
|
@ -67,4 +67,7 @@ class LiblinphoneFlutter {
|
||||||
LiblinphoneFlutterPlatform.instance.toggleMicrophone();
|
LiblinphoneFlutterPlatform.instance.toggleMicrophone();
|
||||||
|
|
||||||
Future<bool> stop() async => LiblinphoneFlutterPlatform.instance.stop();
|
Future<bool> stop() async => LiblinphoneFlutterPlatform.instance.stop();
|
||||||
|
|
||||||
|
Future<void> syncCurrentState() async =>
|
||||||
|
LiblinphoneFlutterPlatform.instance.syncCurrentState();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,4 +84,9 @@ class MethodChannelLiblinphoneFlutter extends LiblinphoneFlutterPlatform {
|
||||||
Future<bool> stop() async {
|
Future<bool> stop() async {
|
||||||
return (await methodChannel.invokeMethod<bool>('stop'))!;
|
return (await methodChannel.invokeMethod<bool>('stop'))!;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Future<bool> syncCurrentState() async {
|
||||||
|
return (await methodChannel.invokeMethod<bool>('syncCurrentState'))!;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -77,4 +77,8 @@ abstract class LiblinphoneFlutterPlatform extends PlatformInterface {
|
||||||
Future<bool> stop() {
|
Future<bool> stop() {
|
||||||
throw UnimplementedError('stop() has not been implemented.');
|
throw UnimplementedError('stop() has not been implemented.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<bool> syncCurrentState() {
|
||||||
|
throw UnimplementedError('syncCurrentState() has not been implemented.');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
name: liblinphone_flutter
|
name: liblinphone_flutter
|
||||||
description: "libLinPhone integration library for Flutter apps"
|
description: "libLinPhone integration library for Flutter apps"
|
||||||
version: 0.0.2
|
version: 0.0.3
|
||||||
homepage: "https://git.nuark.xyz/nuark/liblinphone_flutter"
|
homepage: "https://git.nuark.xyz/nuark/liblinphone_flutter"
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue