Skip to content

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

ReturnMethodDescription
List<UserInfo>getAllContact()Get all contacts of temi
UserInfogetAdminInfo()Get administrator information of temi
StringstartTelepresence(String displayName, String peerId, Platform platform)Start a telepresence
intstopTelepresence()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
StringstartMeeting(List<Participant> participants, boolean firstParticipantJoinedAsHost, boolean blockRobotInteraction)Start a multiparty meeting
intsetMicGainLevel(int micGainLevel)Set microphone gain level
Abstract ClassDescription
OnUsersUpdatedListenerListener of users information updated
OnTelepresenceStatusChangedListenerListener of telepresence status changed
InterfaceDescription
OnTelepresenceEventChangedListenerListener of telepresence event changed
ModelDescription
UserInfoUser information
RecentCallModelRecent call record
CallStateCall state
CallEventModelCall video
PlatformUser platform
MemberStatusModelAvailability of temi members(Administrator, Owners)
LinkBasedMeetingLink based meeting entity
ParticipantMeeting 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

    TypeDescription
    List<UserInfo>List of temi contacts' user information
  • Prototype

    java
    List<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

    TypeDescription
    UserInfoUser information of administrator
  • Prototype

    java
    UserInfo 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

    ParameterTypeDescription
    displayNameStringString value of the name of the person you want to call
    peerIdStringString value of the id of the person you want to call
    platformPlatformThe 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

    TypeDescription
    String-
  • Prototype

    java
    String 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

    TypeDescription
    int200 OK
    400 failed to verify package name
    403 meeting permission required
    404 No onging telepresence
    500 SDK internal error
  • Prototype

    java
    int stopTelepresence();
  • Required permissions

    Meetings

  • Support from

    1.130.1


getRecentCalls()

Using this method to get the recent call records.

  • Return

    TypeDescription
    List<RecentCallModel>List of recent call records
  • Prototype

    java
    List\<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

    TypeDescription
    List<MemberStatusModel>List of temi members' availability status
  • Prototype

    java
    List\<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

    TypeDescription
    Pair<int, String>response code and meeting link or error reason.
    200 OK, with meeting link like https://center.robotemi.com/meetings/{linkId}
    403, Meetings permission required.
    429, request too frequently, shall be 5 seconds interval
  • Prototype

    java
    Pair\<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

    ParameterTypeDescription
    participantsList<Participant>Participants to be invited
    firstParticipantJoinedAsHostBooleanSet to true, then first participant joined will be assigned as host. Otherwise launcher will be the host
    blockRobotInteractionBooleanDisable some launcher buttons in the call. Prevent user to interrupt the call, added in 132 version
  • Return

    TypeDescription
    Stringresponse code
    200 OK
    403, Meetings permission required
  • Prototype

    java
    String 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

    ParameterTypeDescription
    micGainLevelintValue from 1-4
  • Prototype

    TypeDescription
    intresponse code
    0 failed
    1 succeed
    403, SETTINGS permission required
    429, too many request, wait for 2 seconds
  • Prototype

    java
    int 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

java
package com.robotemi.sdk.listeners;

abstract class OnUsersUpdatedListener {}

Attributes

AttributeTypeDescription
userIdsList\<String\>List of temi contacts' ID

Abstract methods

  • Parameters

    ParameterTypeDescription
    userUserInfoThe user information that has been changed
  • Prototype

    java
    void onUserUpdated(UserInfo user);

Method for adding listener

  • Parameters

    ParameterTypeDescription
    listenerOnUsersUpdatedListenerThe object of the child class of this class
  • Prototype

    java
    void addOnUsersUpdatedListener(OnUsersUpdatedListener listener);

Method for removing listener

  • Parameters

    ParameterTypeDescription
    listenerOnUsersUpdatedListenerThe object of the child class of this class
  • Prototype

    java
    void 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

java
package com.robotemi.sdk.listeners;

abstract class OnTelepresenceStatusChangedListener {}

Attributes

AttributeTypeDescription
sessionIdStringSession ID

Abstract methods

  • Parameters

    ParameterTypeDescription
    callStateCallStateState of the call
  • Prototype

java
void onTelepresenceStatusChanged(CallState callState);

Method for adding listener

  • Parameters

    ParameterTypeDescription
    listenerOnTelepresenceStatusChangedListenerThe object of the child class of this class
  • Prototype

    java
    void addOnTelepresenceStatusChangedListener(OnTelepresenceStatusChangedListener listener);

Method for removing listener

  • Parameters

    ParameterTypeDescription
    listenerOnTelepresenceStatusChangedListenerThe object of the child class of this class
  • Prototype

    java
    void 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

java
package com.robotemi.sdk.listeners;

interface OnTelepresenceEventChangedListener {}

Abstract methods

  • Parameters

    ParametersTypeDescription
    callEventModelCallEventModelCall event
  • Prototype

    java
    void onTelepresenceEventChanged(CallEventModel calleventModel);

Method for adding listener

  • Parameters

    ParameterTypeDescription
    listenerOnTelepresenceEventChangedListenerThe object of the class implements this listener interface
  • Prototype

    java
    void addOnTelepresenceEventChangedListener(OnTelepresenceEventChangedListener listener);

Method for removing listener

  • Parameters

    ParameterTypeDescription
    listenerOnTelepresenceEventChangedListenerThe object of the class implements this listener interface
  • Prototype

    java
    void removeOnTelepresenceEventChangedListener(OnTelepresenceEventChangedListener listener);

Models

UserInfo

Object used to hold the information of user.

Prototype

java
package com.robotemi.sdk;

class UserInfo {}

Attributes

AttributeTypeDescription
userIdStringID of user
nameStringName of user
picUrlStringAvatar picture URL of user
roleintRole 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

java
package com.robotemi.sdk.telepresence;

class CallState {}

Attributes

AttributeTypeDescription
sessionIdStringUnique id for the telepresence call
stateStateCall state
lowLightModeBooleanLow light mode ON/OFF (supported from 130 version)

State

Used to hold the state of telepresence call.

Prototype

java
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

java
package com.robotemi.sdk.model;

class CallEventModel {}

Attributes

AttributeTypeDescription
sessionIdStringUnique id for the telepresence call
typeintType of the call, incoming(0) or outgoing(1)
stateintState of the call, started(0) or ended(1)

Static constants

ConstantTypeValueDescription
TYPE_INCOMINGint0Incoming call
TYPE_OUTGOINGint1Outgoing call
STATE_STARTEDint0Call started
STATE_ENDEDint1Call ended

Platform

Type of temi clients.

Prototype

java
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

java
package com.robotemi.sdk.model;

class MemberStatusModel {}

Attributes

AttributeTypeDescription
memberIdStringID of temi member
mobileStatusintAvailability status of member in temi mobile App
centerStatusintAvailability status of member in temi Center

Static constants

ConstantTypeValueDescription
STATUS_ONLINEint0Online and available
STATUS_OFFLINEint1Offline
STATUS_BUSYint2Busy

LinkBasedMeeting

Link based meeting entity

Prototype

java
package com.robotemi.sdk.telepresence;

class LinkBasedMeeting {}

Attributes

AttributeTypeDescription
topicStringTopic for the meeting
availabilityAvailabilityLink availablity time range. Define start/end time of the link, or always available
limitLimitCall duration limitation, and usage time limitation
permissionPermissionDefine the link users' permission to control the robot, or create notes.
securitySecuritySet passcode for the meeting

Participant

Meeting participant entity

Prototype

java
package com.robotemi.sdk.telepresence;

class Participant {}

Attributes

AttributeTypeDescription
peerIdStringParticipant ID, same as peerId in startTelepresence
platformPlatformPlatform.MOBILE, Platform.TEMI_CENTER