User & Telepresence
In this page we will outline all the SDK methods that are related to temi users and telepresence. temi users are people who have a temi account, this means they have downloaded the mobile app, registered and that now you can call them from temi.
API Overview
| Return | Method | Description |
|---|---|---|
| List<UserInfo> | getAllContact() | Get all contacts of temi |
| UserInfo | getAdminInfo() | Get administrator information of temi |
| String | startTelepresence(String displayName, String peerId, Platform platform) | Start a telepresence |
| int | stopTelepresence() | Stop ongoing telepresence |
| List<RecentCallModel> | getRecentCalls() | Get recent call records |
| List<MemberStatusModel> | getMembersStatus() | Get the availability of temi members(Administrator, Owners) |
| Pair<Int, String> | createLinkBasedMeeting(LinkBasedMeeting linkBasedMeeing) | Create a link based meeting |
| String | startMeeting(List<Participant> participants, boolean firstParticipantJoinedAsHost, boolean blockRobotInteraction) | Start a multiparty meeting |
| int | setMicGainLevel(int micGainLevel) | Set microphone gain level |
| Abstract Class | Description |
|---|---|
| OnUsersUpdatedListener | Listener of users information updated |
| OnTelepresenceStatusChangedListener | Listener of telepresence status changed |
| Interface | Description |
|---|---|
| OnTelepresenceEventChangedListener | Listener of telepresence event changed |
| Model | Description |
|---|---|
| UserInfo | User information |
| RecentCallModel | Recent call record |
| CallState | Call state |
| CallEventModel | Call video |
| Platform | User platform |
| MemberStatusModel | Availability of temi members(Administrator, Owners) |
| LinkBasedMeeting | Link based meeting entity |
| Participant | Meeting participant entity |
Methods
getAllContact()
Use this method to fetch all the temi contacts that are synced with the launcher. These contacts are saved on the admin's mobile device and are registered to the temi service.
Return
Type Description List<UserInfo> List of temi contacts' user information Prototype
javaList<UserInfo> getAllContact();Required permissions
None.
Support from
0.10.36
getAdminInfo()
Use this method to fetech temi's admin user information, this information can be used for many things but mainly it's useful to make calls from temi to the admin's mobile device.
Return
Type Description UserInfo User information of administrator Prototype
javaUserInfo getAdminInfo();Required permissions
None.
Support from
0.10.36
startTelepresence()
Use this method to initiate a telepresence session using the temi telepresence service to one of the admin's temi contacts.
Parameters
Parameter Type Description displayName String String value of the name of the person you want to callpeerId String String value of the id of the person you want to call platform Platform The target platform you want to make a video call. You can make a video call to the temi App of any contact, but you can only make a video call to the administrator or the owner’s temi center Return
Type Description String - Prototype
javaString startTelepresence(String displayName, String peerId, Platform platform);Required permissions
None.
Support from
0.10.36
stopTelepresence()
Use this method to stop ongoing telepresence session.
Parameters
None.
Return
Type Description int 200 OK
400 failed to verify package name
403 meeting permission required
404 No onging telepresence
500 SDK internal errorPrototype
javaint stopTelepresence();Required permissions
Meetings
Support from
1.130.1
getRecentCalls()
Using this method to get the recent call records.
Return
Type Description List<RecentCallModel> List of recent call records Prototype
javaList\<RecentCallModel\> getRecentCalls();Required permissions
None.
Support from
0.10.36
getMembersStatus()
Using this method to get the availability of temi members(Administrator, Owners). Generally used to determine whether video calls can be made.
Return
Type Description List<MemberStatusModel> List of temi members' availability status Prototype
javaList\<MemberStatusModel\> getMembersStatus();Required permissions
None.
Support from
0.10.72
createLinkBasedMeeting()
Using this method to create a link based meeting for current robot on behalf of SDK, with the same functionalities as on temi mobile and temi center.
Return
Type Description Pair<int, String> response code and meeting link or error reason.
200 OK, with meeting link likehttps://center.robotemi.com/meetings/{linkId}
403, Meetings permission required.
429, request too frequently, shall be 5 seconds intervalPrototype
javaPair\<int, String\> createLinkBasedMeeting(LinkBasedMeeting linkbasedMeeting);Required permissions
Meetings.
Support from
1.130.0
startMeeting()
Start a multiparty meeting with robot's private meeting link, particiants in the parameter will be invited and admitted automatically.
Parameters
Parameter Type Description participants List<Participant> Participants to be invited firstParticipantJoinedAsHost Boolean Set to true, then first participant joined will be assigned as host. Otherwise launcher will be the host blockRobotInteraction Boolean Disable some launcher buttons in the call. Prevent user to interrupt the call, added in 132 version Return
Type Description String response code
200 OK
403, Meetings permission requiredPrototype
javaString startMeeting(List\<Participant\> participants, boolean firstParticipantJoinedAsHost, boolean blockRobotInteraction);Required permissions
Meetings.
Support from
1.131.0
setMicGainLevel()
Set microphone gain level in temi meetings.
Parameters
Parameter Type Description micGainLevel int Value from 1-4 Prototype
Type Description int response code
0 failed
1 succeed
403, SETTINGS permission required
429, too many request, wait for 2 secondsPrototype
javaint setMicGainLevel(int micGainLevel);Required permissions
SETTINGS
Support from
1.133.0
Abstract Classes
OnUsersUpdatedListener
Listener for temi contacts changes. Every time one of the admin's contacts makes a change to his info, or is added or deleted from the contact's list the listener will be triggered.
Prototype
package com.robotemi.sdk.listeners;
abstract class OnUsersUpdatedListener {}Attributes
| Attribute | Type | Description |
|---|---|---|
| userIds | List\<String\> | List of temi contacts' ID |
Abstract methods
Parameters
Parameter Type Description user UserInfo The user information that has been changed Prototype
javavoid onUserUpdated(UserInfo user);
Method for adding listener
Parameters
Parameter Type Description listener OnUsersUpdatedListener The object of the child class of this class Prototype
javavoid addOnUsersUpdatedListener(OnUsersUpdatedListener listener);
Method for removing listener
Parameters
Parameter Type Description listener OnUsersUpdatedListener The object of the child class of this class Prototype
javavoid removeOnUsersUpdatedListener(OnUsersUpdatedListener listener);
OnTelepresenceStatusChangedListener
Listener for telepresence status changes. By adding this listener you will mainly know if the call has started, ended or declined.
From 129 version, sessionId is not required, set sessionId="" is enough, status all telepresence calls can be monitored from this callback.
Prototype
package com.robotemi.sdk.listeners;
abstract class OnTelepresenceStatusChangedListener {}Attributes
| Attribute | Type | Description |
|---|---|---|
| sessionId | String |
Abstract methods
Parameters
Parameter Type Description callState CallState State of the call Prototype
void onTelepresenceStatusChanged(CallState callState);Method for adding listener
Parameters
Parameter Type Description listener OnTelepresenceStatusChangedListener The object of the child class of this class Prototype
javavoid addOnTelepresenceStatusChangedListener(OnTelepresenceStatusChangedListener listener);
Method for removing listener
Parameters
Parameter Type Description listener OnTelepresenceStatusChangedListener The object of the child class of this class Prototype
javavoid removeOnTelepresenceStatusChangedListener(OnTelepresenceStatusChangedListener listener);
Interfaces
OnTelepresenceEventChangedListener
Listener for telepresence status changes. Through this listener you can listen to all incoming (start and end) and outgoing (start and end) events.
Prototype
package com.robotemi.sdk.listeners;
interface OnTelepresenceEventChangedListener {}Abstract methods
Parameters
Parameters Type Description callEventModel CallEventModel Call event Prototype
javavoid onTelepresenceEventChanged(CallEventModel calleventModel);
Method for adding listener
Parameters
Parameter Type Description listener OnTelepresenceEventChangedListener The object of the class implements this listener interface Prototype
javavoid addOnTelepresenceEventChangedListener(OnTelepresenceEventChangedListener listener);
Method for removing listener
Parameters
Parameter Type Description listener OnTelepresenceEventChangedListener The object of the class implements this listener interface Prototype
javavoid removeOnTelepresenceEventChangedListener(OnTelepresenceEventChangedListener listener);
Models
UserInfo
Object used to hold the information of user.
Prototype
package com.robotemi.sdk;
class UserInfo {}Attributes
| Attribute | Type | Description |
|---|---|---|
| userId | String | ID of user |
| name | String | Name of user |
| picUrl | String | Avatar picture URL of user |
| role | int | Role of user, 0 means administrator, 1 means owner, 2 means contact. From 1.129.1 version, 0 means administrators of robot, 1 means collaborators, 2 means guest, 3 means contacts assigned to this robot, who are temi registered user, and can be called. 10 means contacts assigned to this robot, but only used for face recognition, cannot be called with [UserInfo.userId] |
CallState
Used to hold the call state.
Prototype
package com.robotemi.sdk.telepresence;
class CallState {}Attributes
| Attribute | Type | Description |
|---|---|---|
| sessionId | String | |
| state | State | Call state |
| lowLightMode | Boolean | Low light mode ON/OFF (supported from 130 version) |
State
Used to hold the state of telepresence call.
Prototype
package com.robotemi.sdk.telepresence.CallState;
enum State {
ENDED, // A call has ended
DECLINED, // A call attempt was declined by the other callee
STARTED, // Call was accepted by the callee and has started
// The following states are added in 1.129.1 version
INITIALIZED, // Call is made but not answered yet.
NOT_ANSWERED, // The other side doesn't answer the call.
BUSY, // The other side is busy.
POOR_CONNECTION, // Cannot establish the call due to connection issue.
CANT_JOIN, // Cannot join the call.
}CallEventModel
Used to hold the call event.
Prototype
package com.robotemi.sdk.model;
class CallEventModel {}Attributes
| Attribute | Type | Description |
|---|---|---|
| sessionId | String | |
| type | int | Type of the call, incoming(0) or outgoing(1) |
| state | int | State of the call, started(0) or ended(1) |
Static constants
| Constant | Type | Value | Description |
|---|---|---|---|
| TYPE_INCOMING | int | 0 | Incoming call |
| TYPE_OUTGOING | int | 1 | Outgoing call |
| STATE_STARTED | int | 0 | Call started |
| STATE_ENDED | int | 1 | Call ended |
Platform
Type of temi clients.
Prototype
package com.robotemi.sdk.constants;
enum Platform {
MOBILE, // temi mobile App
TEMI_CENTER // temi Center
}MemberStatusModel
Used to hold the temi member's availability status information.
Prototype
package com.robotemi.sdk.model;
class MemberStatusModel {}Attributes
| Attribute | Type | Description |
|---|---|---|
| memberId | String | ID of temi member |
| mobileStatus | int | Availability status of member in temi mobile App |
| centerStatus | int | Availability status of member in temi Center |
Static constants
| Constant | Type | Value | Description |
|---|---|---|---|
| STATUS_ONLINE | int | 0 | Online and available |
| STATUS_OFFLINE | int | 1 | Offline |
| STATUS_BUSY | int | 2 | Busy |
LinkBasedMeeting
Link based meeting entity
Prototype
package com.robotemi.sdk.telepresence;
class LinkBasedMeeting {}Attributes
| Attribute | Type | Description |
|---|---|---|
| topic | String | Topic for the meeting |
| availability | Availability | Link availablity time range. Define start/end time of the link, or always available |
| limit | Limit | Call duration limitation, and usage time limitation |
| permission | Permission | Define the link users' permission to control the robot, or create notes. |
| security | Security | Set passcode for the meeting |
Participant
Meeting participant entity
Prototype
package com.robotemi.sdk.telepresence;
class Participant {}Attributes
| Attribute | Type | Description |
|---|---|---|
| peerId | String | Participant ID, same as peerId in startTelepresence |
| platform | Platform | Platform.MOBILE, Platform.TEMI_CENTER |