-
Notifications
You must be signed in to change notification settings - Fork 87
Users & 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.
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 participants) | Start a multiparty meeting |
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 |
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
List<UserInfo> getAllContact();
-
Required permissions
None.
-
Support from
0.10.36
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
UserInfo getAdminInfo();
-
Required permissions
None.
-
Support from
0.10.36
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 String displayName String value of the name of the person you want to callString peerId 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
String startTelepresence(String displayName, String peerId, Platform platform);
-
Required permissions
None.
-
Support from
0.10.36
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 error -
Prototype
int stopTelepresence();
-
Required permissions
Meetings
-
Support from
1.130.1
Using this method to get the recent call records.
-
Return
Type Description List<RecentCallModel> List of recent call records -
Prototype
List<RecentCallModel> getRecentCalls();
-
Required permissions
None.
-
Support from
0.10.36
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
List<MemberStatusModel> getMembersStatus();
-
Required permissions
None.
-
Support from
0.10.72
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 interval -
Prototype
Pair<int, String> createLinkBasedMeeting(LinkBasedMeeting linkbasedMeeting);
-
Required permissions
Meetings.
-
Support from
1.130.0
Start a multiparty meeting with robot's private meeting link, particiants in the parameter will be invited and admitted automatically.
-
Return
Type Description String response code
200 OK
403, Meetings permission required -
Prototype
String startMeeting(List<Participant> participants);
-
Required permissions
Meetings.
-
Support from
1.131.0
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.
package com.robotemi.sdk.listeners;
abstract class OnUsersUpdatedListener {}
Attribute | Type | Description |
---|---|---|
userIds | List<String> | List of temi contacts' ID |
-
Parameters
Parameter Type Description user UserInfo The user information that has been changed -
Prototype
void onUserUpdated(UserInfo user);
-
Parameters
Parameter Type Description listener OnUsersUpdatedListener The object of the child class of this class -
Prototype
void addOnUsersUpdatedListener(OnUsersUpdatedListener listener);
-
Parameters
Parameter Type Description listener OnUsersUpdatedListener The object of the child class of this class -
Prototype
void removeOnUsersUpdatedListener(OnUsersUpdatedListener listener);
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.
package com.robotemi.sdk.listeners;
abstract class OnTelepresenceStatusChangedListener {}
Attribute | Type | Description |
---|---|---|
sessionId | String |
-
Parameters
Parameter Type Description callState CallState State of the call -
Prototype
void onTelepresenceStatusChanged(CallState callState);
-
Parameters
Parameter Type Description listener OnTelepresenceStatusChangedListener The object of the child class of this class -
Prototype
void addOnTelepresenceStatusChangedListener(OnTelepresenceStatusChangedListener listener);
-
Parameters
Parameter Type Description listener OnTelepresenceStatusChangedListener The object of the child class of this class -
Prototype
void removeOnTelepresenceStatusChangedListener(OnTelepresenceStatusChangedListener listener);
Listener for telepresence status changes. Through this listener you can listen to all incoming (start and end) and outgoing (start and end) events.
package com.robotemi.sdk.listeners;
interface OnTelepresenceEventChangedListener {}
-
Parameters
Parameters Type Description callEventModel callEventModel Call event -
Prototype
void onTelepresenceEventChanged(CallEventModel calleventModel);
-
Parameters
Parameter Type Description listener OnTelepresenceEventChangedListener The object of the class implements this listener interface -
Prototype
void addOnTelepresenceEventChangedListener(OnTelepresenceEventChangedListener listener);
-
Parameters
Parameter Type Description listener OnTelepresenceEventChangedListener The object of the class implements this listener interface -
Prototype
void removeOnTelepresenceEventChangedListener(OnTelepresenceEventChangedListener listener);
Object used to hold the information of user.
package com.robotemi.sdk;
class UserInfo {}
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] |
Used to hold the call state.
package com.robotemi.sdk.telepresence;
class CallState {}
Attribute | Type | Description |
---|---|---|
sessionId | String | |
state | State | Call state |
lowLightMode | Boolean | Low light mode ON/OFF (supported from 130 version) |
Used to hold the state of telepresence call.
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.
}
Used to hold the call event.
package com.robotemi.sdk.model;
class CallEventModel {}
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) |
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 |
Type of temi clients.
package com.robotemi.sdk.constants;
enum Platform {
MOBILE, // temi mobile App
TEMI_CENTER // temi Center
}
Used to hold the temi member's availability status information.
package com.robotemi.sdk.model;
class MemberStatusModel {}
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 |
Constant | Type | Value | Description |
---|---|---|---|
STATUS_ONLINE | int | 0 | Online and available |
STATUS_OFFLINE | int | 1 | Offline |
STATUS_BUSY | int | 2 | Busy |
Link based meeting entity
package com.robotemi.sdk.telepresence;
class LinkBasedMeeting {}
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 |
Meeting participant entity
package com.robotemi.sdk.telepresence;
class Participant {}
Attribute | Type | Description |
---|---|---|
peerId | String | Participant ID, same as peerId in startTelepresence
|
platform | Platform | Platform.MOBILE, Platform.TEMI_CENTER |