Skip to content

Commit

Permalink
Merge pull request #397 from robotemi/sprint_131/meeting_host_assign
Browse files Browse the repository at this point in the history
Add parameter to assign first participant as host.
  • Loading branch information
zjn0505 authored Jul 5, 2023
2 parents 37cb35d + 8afc2a3 commit b8e2562
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down
2 changes: 1 addition & 1 deletion sdk/src/main/aidl/com/robotemi/sdk/ISdkService.aidl
Original file line number Diff line number Diff line change
Expand Up @@ -358,5 +358,5 @@ interface ISdkService {

int enableStandBy(in String packageName, boolean enabled, in String password);

String startMeeting(in String packageName, in List<Participant> participants);
String startMeeting(in String packageName, in List<Participant> participants, boolean firstParticipantJoinedAsHost);
}
7 changes: 5 additions & 2 deletions sdk/src/main/java/com/robotemi/sdk/Robot.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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<Participant>
participants: List<Participant>,
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")
}
Expand Down
1 change: 0 additions & 1 deletion sdk/src/main/java/com/robotemi/sdk/map/Floor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b8e2562

Please sign in to comment.