From ad1ed071e28e4d2ba79ff078e6b95f4bf45b3fbc Mon Sep 17 00:00:00 2001 From: zjn0505 Date: Wed, 5 Jul 2023 15:01:37 +0800 Subject: [PATCH 1/2] Add parameter to assign first participant as host. --- .../src/main/java/com/robotemi/sdk/sample/MainActivity.kt | 2 +- sdk/src/main/aidl/com/robotemi/sdk/ISdkService.aidl | 2 +- sdk/src/main/java/com/robotemi/sdk/Robot.kt | 7 +++++-- sdk/src/main/java/com/robotemi/sdk/map/Floor.kt | 1 - 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/sample/src/main/java/com/robotemi/sdk/sample/MainActivity.kt b/sample/src/main/java/com/robotemi/sdk/sample/MainActivity.kt index efd2d952..fd24a3bb 100644 --- a/sample/src/main/java/com/robotemi/sdk/sample/MainActivity.kt +++ b/sample/src/main/java/com/robotemi/sdk/sample/MainActivity.kt @@ -1765,7 +1765,7 @@ class MainActivity : AppCompatActivity(), NlpListener, OnRobotReadyListener, val resp = robot.startMeeting(listOf( Participant(target.userId, Platform.MOBILE), Participant(target.userId, Platform.TEMI_CENTER), - )) + ), firstParticipantJoinedAsHost = true) Log.d("MainActivity", "startMeeting result $resp") } diff --git a/sdk/src/main/aidl/com/robotemi/sdk/ISdkService.aidl b/sdk/src/main/aidl/com/robotemi/sdk/ISdkService.aidl index afb9837f..e5a399a6 100644 --- a/sdk/src/main/aidl/com/robotemi/sdk/ISdkService.aidl +++ b/sdk/src/main/aidl/com/robotemi/sdk/ISdkService.aidl @@ -358,5 +358,5 @@ interface ISdkService { int enableStandBy(in String packageName, boolean enabled, in String password); - String startMeeting(in String packageName, in List participants); + String startMeeting(in String packageName, in List participants, boolean firstParticipantJoinedAsHost); } \ No newline at end of file diff --git a/sdk/src/main/java/com/robotemi/sdk/Robot.kt b/sdk/src/main/java/com/robotemi/sdk/Robot.kt index ef591c42..9b1458f8 100644 --- a/sdk/src/main/java/com/robotemi/sdk/Robot.kt +++ b/sdk/src/main/java/com/robotemi/sdk/Robot.kt @@ -1620,14 +1620,17 @@ class Robot private constructor(private val context: Context) { * Start a video call to the temi user. Require MEETINGS permission. * * @param participants list of user names and peer ids. + * @param firstParticipantJoinedAsHost, Set it as true to automatically assign first participant joined as meeting host. + * Otherwise robot will be the host. * @return 403 require MEETINGS permission * 200 OK. */ fun startMeeting( - participants: List + participants: List, + firstParticipantJoinedAsHost: Boolean, ): String { try { - return sdkService?.startMeeting(applicationInfo.packageName, participants) ?: "" + return sdkService?.startMeeting(applicationInfo.packageName, participants, firstParticipantJoinedAsHost) ?: "" } catch (e: RemoteException) { Log.e(TAG, "startMeeting() error") } diff --git a/sdk/src/main/java/com/robotemi/sdk/map/Floor.kt b/sdk/src/main/java/com/robotemi/sdk/map/Floor.kt index a7afae19..537ab476 100644 --- a/sdk/src/main/java/com/robotemi/sdk/map/Floor.kt +++ b/sdk/src/main/java/com/robotemi/sdk/map/Floor.kt @@ -2,7 +2,6 @@ package com.robotemi.sdk.map import android.os.Parcel import android.os.Parcelable -import android.util.Log import androidx.annotation.Keep import com.google.gson.Gson import com.google.gson.annotations.SerializedName From 8afc2a3e4adce5b5e2aced1d12d743cf201adf0b Mon Sep 17 00:00:00 2001 From: zjn0505 Date: Wed, 5 Jul 2023 17:38:45 +0800 Subject: [PATCH 2/2] Bump to 1.131.1 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 03b27e3b..80d352cc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,7 +21,7 @@ android.enableJetifier=true kotlin.code.style=official GROUP=com.robotemi -VERSION_NAME=1.131.0 +VERSION_NAME=1.131.1 POM_URL=https://github.com/robotemi/sdk/ POM_SCM_URL=https://github.com/robotemi/sdk/ POM_SCM_CONNECTION=scm:git:git://github.com/robotemi/sdk.git