### Robotemi Start Page API Source: https://github.com/robotemi/sdk/wiki/Utils Starts a specific system internal page on the temi robot. ```APIDOC ## POST /api/system/page/start ### Description Start a system internal page. ### Method POST ### Endpoint /api/system/page/start ### Parameters #### Request Body - **page** (String) - Required - The identifier of the page to start (e.g., 'HOME', 'SETTINGS'). ### Request Example ```json { "page": "HOME" } ``` ### Response #### Success Response (200) - **status** (String) - Operation status message. #### Response Example ```json { "status": "Page started successfully." } ``` ``` -------------------------------- ### Page Enum Source: https://github.com/robotemi/sdk/wiki/Utils Defines system internal pages that can be started. ```APIDOC ## Page Enum ### Description System internal page. The current system interface that can be started. ### Prototype ```java enum Page { SETTINGS, MAP_EDITOR, CONTACTS, LOCATIONS, ALL_APPS, HOME, TOURS; // Supported in 132 version } ``` ### Enum Values - **Settings**: `SETTINGS` - `com.robotemi.page.settings` - **Map Editor**: `MAP_EDITOR` - `com.robotemi.page.map_editor` - **Contacts**: `CONTACTS` - `com.robotemi.page.contacts` - **Locations**: `LOCATIONS` - `com.robotemi.page.locations` - **App List**: `ALL_APPS` - `com.robotemi.page.all_apps` - **Home Page**: `HOME` - `com.robotemi.page.home` - **Tour list**: `TOURS` - `com.robotemi.page.tours` (Supported in 132 version) ``` -------------------------------- ### Start Telepresence Session (Java) Source: https://github.com/robotemi/sdk/wiki/Release-Info Initiates a telepresence session, similar to starting a meeting but without requiring the Meetings permission. This allows for remote presence interactions. ```Java startTelepresence(); ``` -------------------------------- ### Start Telepresence Source: https://github.com/robotemi/sdk/blob/master/docs/sdk/com.robotemi.sdk/-robot/index.md Starts a video call to a specified temi user. Allows specifying the display name, peer ID, and optionally the platform. ```APIDOC ## POST /startTelepresence ### Description Starts a video call to the temi user. ### Method POST ### Endpoint /startTelepresence ### Parameters #### Query Parameters - **displayName** (String) - Required - The display name for the telepresence session. - **peerId** (String) - Required - The unique identifier of the peer to call. - **platform** (Platform) - Optional - The platform of the peer (defaults to Platform.MOBILE). ### Request Example ```json { "displayName": "John Doe", "peerId": "peer123", "platform": "MOBILE" } ``` ### Response #### Success Response (200) - **String** - A confirmation message or session ID. #### Response Example ```json { "message": "Telepresence session started successfully." } ``` ``` -------------------------------- ### Examples of Sending Serial Commands to temi GO Source: https://github.com/robotemi/sdk/wiki/Serial-Communication This section provides practical examples of using the `sendSerialCommand` method in Kotlin to control various hardware components of the temi GO robot. These include calibrating the tray, opening/closing doors, setting LED colors, and displaying text on the LCD. ```kotlin // Examples of send // Calibrate temi Tray Robot.getInstance().sendSerialCommand(Serial.CMD_TRAY_CALIBRATE, byteArrayOf()) // Open door 1. Robot.getInstance().sendSerialCommand(Serial.CMD_DOOR_OPEN, byteArrayOf(1)) // Set tray 1 LED to red Robot.getInstance().sendSerialCommand(Serial.CMD_TRAY_LIGHT, byteArrayOf(0x00, 0xff.toByte(), 0x00, 0x00)) // Set LCD text Robot.getInstance().sendSerialCommand(Serial.CMD_LCD_TEXT, Serial.getLcdBytes("Hello")) // Set LCD text or background color Robot.getInstance().sendSerialCommand( Serial.CMD_LCD_TEXT, getLcdColorBytes(byteArrayOf(0x00, 0xff.toByte(), 0x00, 0x00), target = Serial.LCD.TEXT_0_COLOR) ) Robot.getInstance().sendSerialCommand( Serial.CMD_LCD_TEXT, getLcdColorBytes(byteArrayOf(0x00, 0xff.toByte(), 0x00, 0x00), target = Serial.LCD.TEXT_0_BACKGROUND) ) // Set Strip light to breathing red/green Robot.getInstance().sendSerialCommand( Serial.CMD_STRIP_LIGHT, Serial.getStripBytes( mode = 2, primaryColor = byteArrayOf(0xff.toByte(), 0x00, 0x00), secondaryColor = byteArrayOf(0x00, 0xff.toByte(), 0x00), interval = 20 ) ) ``` -------------------------------- ### System Control API Source: https://github.com/robotemi/sdk/wiki/Utils Provides methods for fundamental system operations like restarting and starting system pages. ```APIDOC ## POST /restart ### Description Restarts the temi system. ### Method POST ### Endpoint /restart ### Response #### Success Response (200) Indicates the restart command was issued. ## POST /startPage ### Description Starts a system internal page. ### Method POST ### Endpoint /startPage ### Parameters #### Request Body - **page** (Page) - Required - The system page to start. ### Request Example ```json { "page": "home" } ``` ### Response #### Success Response (200) Indicates the page start command was issued. ## POST /setLocked ### Description Enables or disables password protection for the system. ### Method POST ### Endpoint /setLocked ### Parameters #### Request Body - **locked** (boolean) - Required - Set to `true` to enable protection, `false` to disable. ### Response #### Success Response (200) Indicates the locked status was updated. ``` -------------------------------- ### Start Activity Source: https://github.com/robotemi/sdk/blob/master/docs/sdk/com.robotemi.sdk/-robot/index.md Handles the start of an activity, receiving ActivityInfo as a parameter. This function is annotated with @UiThread, indicating it should be called on the main thread. ```kotlin fun onStart(activityInfo: ActivityInfo) ``` -------------------------------- ### Meeting Management Source: https://github.com/robotemi/sdk/wiki/Users-&-Telepresence Methods for creating and starting meetings. ```APIDOC ## POST /api/meetings/link-based ### Description Creates a link-based meeting. ### Method POST ### Endpoint /api/meetings/link-based ### Parameters #### Query Parameters None #### Request Body - **linkBasedMeeting** (LinkBasedMeeting) - An object containing details for the link-based meeting. ### Request Example ```json { "linkBasedMeeting": { "meetingName": "Project Discussion", "participants": ["user123", "user456"] } } ``` ### Response #### Success Response (200) - **meetingId** (int) - The ID of the created meeting. - **meetingLink** (String) - The link to join the meeting. #### Response Example ```json { "meetingId": 101, "meetingLink": "https://temi.com/meeting/abcde" } ``` ``` ```APIDOC ## POST /api/meetings/start ### Description Starts a multiparty meeting. ### Method POST ### Endpoint /api/meetings/start ### Parameters #### Query Parameters None #### Request Body - **participants** (List) - A list of meeting participants. - **firstParticipantJoinedAsHost** (boolean) - Indicates if the first participant joins as the host. - **blockRobotInteraction** (boolean) - Indicates if robot interaction should be blocked during the meeting. ### Request Example ```json { "participants": [ { "userId": "user123", "name": "Alice" }, { "userId": "user456", "name": "Bob" } ], "firstParticipantJoinedAsHost": true, "blockRobotInteraction": false } ``` ### Response #### Success Response (200) - **meetingId** (String) - The ID of the started meeting. #### Response Example ```json { "meetingId": "multi_party_meeting_fgh789" } ``` ``` -------------------------------- ### Volume Control API Source: https://github.com/robotemi/sdk/wiki/Utils Provides methods to set and get the system volume. ```APIDOC ## POST /setVolume ### Description Sets the system volume. The accepted value range is from 0 to 10. Volume can also be adjusted via UI elements. ### Method POST ### Endpoint /setVolume ### Parameters #### Request Body - **volume** (int) - Required - The desired volume level (0-10). ### Request Example ```json { "volume": 5 } ``` ### Response #### Success Response (200) Indicates the volume was successfully set. ## GET /getVolume ### Description Retrieves the current system volume level. ### Method GET ### Endpoint /getVolume ### Response #### Success Response (200) - **volume** (int) - The current volume level (0-10). ### Response Example ```json { "volume": 5 } ``` ``` -------------------------------- ### Start StandBy Mode (Java) Source: https://github.com/robotemi/sdk/wiki/Utils Initiates the robot's StandBy mode. Returns an integer code indicating the outcome, such as success, failure, or reasons for not starting StandBy. Requires 'SETTINGS' permission. ```java int startStandBy(); ``` -------------------------------- ### Manage Video Calls and Meetings with Robot SDK Source: https://context7.com/robotemi/sdk/llms.txt This Kotlin code snippet demonstrates how to manage telepresence and video calls using the Robot SDK. It covers initiating calls to specific users, starting group meetings with multiple participants, creating link-based meetings with customizable options, and stopping ongoing calls. It also includes permission checks and listener setup for call state changes. Dependencies include the Robot SDK library and AppCompatActivity. ```kotlin import com.robotemi.sdk.telepresence.CallState import com.robotemi.sdk.telepresence.Participant import com.robotemi.sdk.telepresence.LinkBasedMeeting import com.robotemi.sdk.listeners.OnTelepresenceStatusChangedListener import com.robotemi.sdk.permission.Permission import java.util.Date import android.util.Log import androidx.appcompat.app.AppCompatActivity import com.robotemi.sdk.Robot import com.robotemi.sdk.telepresence.Platform class TelepresenceActivity : AppCompatActivity() { private lateinit var robot: Robot private val telepresenceListener = object : OnTelepresenceStatusChangedListener("") { override fun onTelepresenceStatusChanged(callState: CallState) { Log.d("Call", "Call state: ${callState.sessionState}") when (callState.sessionState) { "connecting" -> Log.d("Call", "Connecting...") "connected" -> Log.d("Call", "Call connected") "ended" -> Log.d("Call", "Call ended") } } } override fun onStart() { super.onStart() // Assuming 'robot' is initialized elsewhere, e.g., in onCreate // robot = Robot.getInstance() robot.addOnTelepresenceStatusChangedListener(telepresenceListener) // Check permission if (robot.checkSelfPermission(Permission.MEETINGS) != Permission.GRANTED) { robot.requestPermissions(listOf(Permission.MEETINGS), 200) return } // Call the robot admin val admin = robot.adminInfo if (admin != null) { robot.startTelepresence(admin.name, admin.userId) } // Start a meeting with multiple participants val admin = robot.adminInfo ?: return val participants = listOf( Participant(admin.userId, Platform.MOBILE), Participant(admin.userId, Platform.TEMI_CENTER) ) val response = robot.startMeeting( participants = participants, firstParticipantJoinedAsHost = true, blockRobotInteraction = false ) Log.d("Call", "Start meeting response: $response") // Create a link-based meeting Thread { val meeting = LinkBasedMeeting( topic = "Demo Meeting", availability = LinkBasedMeeting.Availability( start = Date(), end = Date(Date().time + 86400000), // 24 hours from now always = false ), limit = LinkBasedMeeting.Limit( callDuration = LinkBasedMeeting.CallDuration.MINUTE_30, usageLimit = LinkBasedMeeting.UsageLimit.NO_LIMIT ), permission = LinkBasedMeeting.Permission.DEFAULT, security = LinkBasedMeeting.Security( password = "123456", hasPassword = true ) ) val (statusCode, meetingLink) = robot.createLinkBasedMeeting(meeting) when (statusCode) { 200 -> Log.d("Call", "Meeting link: $meetingLink") 403 -> Log.d("Call", "Permission denied") 429 -> Log.d("Call", "Too many requests") } }.start() // Stop current call val stopResult = robot.stopTelepresence() Log.d("Call", "Stop call result: $stopResult") } override fun onStop() { robot.removeOnTelepresenceStatusChangedListener(telepresenceListener) super.onStop() } } ``` -------------------------------- ### Android Kotlin Example: Load Map from Storage Source: https://github.com/robotemi/sdk/wiki/LocalMap This Android Kotlin code demonstrates how to load a map backup file using the Robotemi SDK. It shows how to get a URI for a file from the app's internal or external storage using `FileProvider` and then calls the `loadMapWithBackupFile` function. Ensure the `MAP` permission is declared and requested. ```kotlin // ⚠️ Make sure your app has declared and requested for MAP permission buttonLoadMapFromPrivateFile.setOnClickListener { // This code block will load a map backup to temi. // The backup files are taken from either application's internal storage or external storage. // These files are securely store this way and transferred by content provider that only temi launcher can read. // First declare FileProvider in AndroidManifest. // The folder needs to be declared in res/xml/provider_paths.xml // val internalMapDirectory = File(filesDir, "maps") // The folder needs to be declared in res/xml/provider_paths.xml // val externalMapDirectory = File(getExternalFilesDir(null), "maps") lifecycleScope.launch(Dispatchers.IO) { val internalFiles = internalMapDirectory.listFiles()?.toList() ?: listOf() val externalFiles = externalMapDirectory.listFiles()?.toList() ?: listOf() val files = (internalFiles + externalFiles).filter { it.isFile && it.path.endsWith("tar.gz", true) } val builder = AlertDialog.Builder(this@MapActivity) if (files.isNotEmpty()) { builder.setItems(files.map { it.path }.toTypedArray()) { _, which -> val fileSelected = files[which] Log.d("SDK-Sample", "Map file selected ${fileSelected.path}") val uri = FileProvider.getUriForFile(this@MapActivity, AUTHORITY, fileSelected) loadMap(uri) // It is safe to delete the file here if needed. }.setTitle("Select one map file to load") .setNegativeButton("Cancel") { dialog, _ -> dialog.dismiss() } } else { builder.setTitle("No map backup files found") .setMessage("This sample takes map files from\n/sdcard/Android/data/com.robotemi.sdk.sample/files/maps/\nand /data/data/com.robotemi.sdk.sample/files/maps/") .setNegativeButton("Cancel") { dialog, _ -> dialog.dismiss() } } launch(Dispatchers.Main) { builder.show() } } } ... // Other code not shown private fun loadMap(uri: Uri) { val reposeRequired = checkBoxLoadMapWithRepose.isChecked val withoutUI = checkBoxLoadMapWithoutUI.isChecked val position: Position? = if (checkBoxLoadMapFromPose.isChecked) { Position(1f, 1f, 1f) } else { null } Robot.getInstance().loadMapWithBackupFile( uri, ``` -------------------------------- ### GET /roboxVersion Source: https://github.com/robotemi/sdk/blob/master/docs/sdk/com.robotemi.sdk/-robot/index.md Gets the version information for the Robox system. Returns a string. ```APIDOC ## GET /roboxVersion ### Description Retrieves the current version of the Robox software running on the robot. ### Method GET ### Endpoint /roboxVersion ### Parameters None ### Request Example None ### Response #### Success Response (200) - **roboxVersion** (String) - The version string of the Robox system. #### Response Example ```json { "roboxVersion": "1.2.3" } ``` ``` -------------------------------- ### Telepresence and Video Calls API Source: https://context7.com/robotemi/sdk/llms.txt This API allows you to initiate and manage video calls. You can start a telepresence call with a specific user, start a meeting with multiple participants, or create a link-based meeting that can be joined by anyone with the link. ```APIDOC ## Telepresence and Video Calls Initiate and manage video calls with temi Center users or create link-based meetings. ### Methods 1. **Start Telepresence Call** - **Description**: Initiates a telepresence call with a specific user. - **Method**: `robot.startTelepresence(name: String, userId: String)` - **Parameters**: - `name` (String) - Required - The name of the user to call. - `userId` (String) - Required - The unique identifier of the user to call. 2. **Start Meeting** - **Description**: Starts a meeting with a list of participants. - **Method**: `robot.startMeeting(participants: List, firstParticipantJoinedAsHost: Boolean, blockRobotInteraction: Boolean)` - **Parameters**: - `participants` (List) - Required - A list of participants to include in the meeting. - `firstParticipantJoinedAsHost` (Boolean) - Required - Whether the first participant should join as the host. - `blockRobotInteraction` (Boolean) - Required - Whether robot interaction should be blocked during the meeting. - **Response**: `StartMeetingResponse` object indicating the status of the meeting. 3. **Create Link-Based Meeting** - **Description**: Creates a link-based meeting that can be joined by anyone with the provided link. - **Method**: `robot.createLinkBasedMeeting(meeting: LinkBasedMeeting)` - **Parameters**: - `meeting` (LinkBasedMeeting) - Required - An object defining the properties of the link-based meeting. - **Response**: A pair of `(Int, String)` representing the status code and the meeting link. - `statusCode` (Int) - The HTTP status code of the request. - `meetingLink` (String) - The URL for the link-based meeting. - **Status Codes**: - `200`: Meeting link created successfully. - `403`: Permission denied. - `429`: Too many requests. 4. **Stop Telepresence Call** - **Description**: Stops the current telepresence call. - **Method**: `robot.stopTelepresence()` - **Response**: Boolean indicating whether the call was stopped successfully. ### Listeners - **OnTelepresenceStatusChangedListener** - **Description**: Listens for changes in the telepresence call status. - **Callback**: `onTelepresenceStatusChanged(callState: CallState)` - `callState` (CallState) - An object containing the current call state (e.g., `sessionState`). ``` -------------------------------- ### Play a Tour (Java) Source: https://github.com/robotemi/sdk/wiki/Release-Info Initiates the execution of a specified tour on the robot. This function is used to start a pre-defined sequence of actions or movements for the robot. ```Java playTour(); ``` -------------------------------- ### Meetings and Telepresence API Source: https://github.com/robotemi/sdk/wiki/Release-Info This section describes the functionalities related to starting meetings and telepresence sessions, including new parameters and permission requirements. ```APIDOC ## Meetings and Telepresence ### Start Meeting - **Description**: Initiates a meeting session on temi. In newer versions, it can take a `blockRobotInteraction` parameter to disable certain UI elements for remote call security and requires the `MEETINGS` permission. - **Method**: Various (SDK function call) - **Endpoint**: N/A (SDK function) - **Usage**: Call `startMeeting(String meetingId, boolean blockRobotInteraction)` (or similar signature based on version). ### Start Telepresence - **Description**: Initiates a telepresence session. This uses the same logic as `startMeeting()` but does not require the `Meetings` permission. - **Method**: Various (SDK function call) - **Endpoint**: N/A (SDK function) - **Usage**: Call `startTelepresence()` (or similar signature). ### LinkBasedMeeting - **Description**: Handles link-based meetings and also accepts the `blockRobotInteraction` parameter. - **Method**: Various (SDK function call) - **Endpoint**: N/A (SDK function) - **Usage**: Instantiate or call methods related to `LinkBasedMeeting` with the `blockRobotInteraction` parameter. ``` -------------------------------- ### Start Launcher Page Source: https://github.com/robotemi/sdk/blob/master/docs/sdk/com.robotemi.sdk/-robot/index.md Launches a specific internal page within the robot's Launcher interface. This function is part of the Android JVM SDK. ```kotlin fun startPage(page: Page) ``` -------------------------------- ### Robotemi Go-To Speed API Source: https://github.com/robotemi/sdk/wiki/Utils APIs to set and get the speed level for the 'go-to' navigation functionality. ```APIDOC ## POST /api/goto/speed ### Description Set the speed level for the 'go-to' navigation. ### Method POST ### Endpoint /api/goto/speed ### Parameters #### Request Body - **level** (String) - Required - The desired speed level (e.g., 'SLOW', 'NORMAL', 'FAST'). ### Request Example ```json { "level": "NORMAL" } ``` ### Response #### Success Response (200) - **status** (String) - Operation status message. #### Response Example ```json { "status": "Go-to speed level set." } ``` ## GET /api/goto/speed ### Description Get the current speed level for the 'go-to' navigation. ### Method GET ### Endpoint /api/goto/speed ### Parameters None ### Request Example None ### Response #### Success Response (200) - **level** (String) - The current speed level (e.g., 'SLOW', 'NORMAL', 'FAST'). #### Response Example ```json { "level": "NORMAL" } ``` ``` -------------------------------- ### Show App List (Java) Source: https://github.com/robotemi/sdk/wiki/Utils Triggers the display of the robot's application list. This method is available starting from SDK version 0.10.36 and does not require specific permissions. ```java robot.showAppList(); ``` -------------------------------- ### Start Default NLU Source: https://github.com/robotemi/sdk/wiki/Speech Triggers the default Natural Language Understanding (NLU) service with provided text and STT language settings. ```APIDOC ## POST /startDefaultNlu ### Description Initiates the default Natural Language Understanding (NLU) service, processing the given text and STT language configuration. ### Method POST ### Endpoint /startDefaultNlu ### Parameters #### Request Body - **text** (String) - Required - The text to be processed by the NLU service. - **sttLanguage** (SttLanguage) - Required - The language setting for Speech-to-Text (STT) during NLU processing. ``` -------------------------------- ### Get Wakeup Word (Java) Source: https://github.com/robotemi/sdk/wiki/Speech Retrieves the current wake-up word configured for temi. This method is available starting from version 0.10.49. ```java String getWakeupWord(); ``` -------------------------------- ### Launch Tour List Page (Java) Source: https://github.com/robotemi/sdk/wiki/Release-Info Launches the tour list page using the startPage utility. This function navigates the user to the interface where they can view and manage available tours. ```Java startPage(Page.TOURS); ``` -------------------------------- ### Get Map Image - Java Source: https://github.com/robotemi/sdk/wiki/Locations Retrieves the image data representing the robot's current map. Accessing this data requires 'Map' permission and is supported starting from version 1.136.0. ```java MapImage getMapImage(); ``` -------------------------------- ### Install Application on temi using ADB Source: https://github.com/robotemi/sdk/wiki/Installing-and-Uninstalling-temi-Applications Installs an Android application package (APK) onto the temi robot. Requires an established ADB connection and the path to the APK file. Options can be specified for the installation process. ```shell adb install [option] PATH_OF_APK ``` -------------------------------- ### Initialize Robot and Listen for Ready State (Kotlin) Source: https://context7.com/robotemi/sdk/llms.txt Initializes the Robot instance and registers an OnRobotReadyListener to monitor the robot's readiness. This is crucial for ensuring all SDK features are available before use. It requires the AppCompatActivity and related Android libraries. ```kotlin import com.robotemi.sdk.Robot import com.robotemi.sdk.listeners.OnRobotReadyListener import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import android.content.pm.PackageManager class MainActivity : AppCompatActivity(), OnRobotReadyListener { private lateinit var robot: Robot override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) robot = Robot.getInstance() } override fun onStart() { super.onStart() robot.addOnRobotReadyListener(this) } override fun onRobotReady(isReady: Boolean) { if (isReady) { val activityInfo = packageManager.getActivityInfo( componentName, PackageManager.GET_META_DATA ) robot.onStart(activityInfo) // Robot is ready, can now use all SDK features } } override fun onStop() { robot.removeOnRobotReadyListener(this) super.onStop() } } ``` -------------------------------- ### TtsRequest Status STARTED Properties (Kotlin) Source: https://github.com/robotemi/sdk/blob/master/docs/sdk/com.robotemi.sdk/-tts-request/-status/-s-t-a-r-t-e-d/index.md Provides details on the properties 'name' and 'ordinal' for the STARTED status of a TtsRequest. These are standard enum properties in Kotlin. ```kotlin val name: String val ordinal: Int ``` -------------------------------- ### AidlMediaBarController Constructor Source: https://github.com/robotemi/sdk/blob/master/docs/sdk/com.robotemi.sdk.mediabar/-aidl-media-bar-controller/index.md Initializes the AidlMediaBarController with an ISdkService instance. ```APIDOC ## AidlMediaBarController Constructor ### Description Initializes the AidlMediaBarController with an ISdkService instance. ### Method CONSTRUCTOR ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **sdkService** (ISdkService) - Required - The SDK service instance. ### Request Example ```json { "sdkService": "ISdkService_instance" } ``` ### Response #### Success Response (200) None #### Response Example None ``` -------------------------------- ### MediaObject Creation and Management Source: https://github.com/robotemi/sdk/blob/master/docs/sdk/com.robotemi.sdk/-media-object/index.md This section details how to create and manage MediaObject instances, including setting and retrieving media URIs, accessing file information, and handling MIME types. ```APIDOC ## POST /mediaobject/create ### Description Creates a new MediaObject instance with the specified MIME type and file. ### Method POST ### Endpoint /mediaobject/create ### Parameters #### Query Parameters - **mimeType** (MediaObject.MimeType) - Required - The MIME type of the media. - **file** (File) - Required - The file associated with the media object. ### Request Example ```json { "mimeType": "IMAGE_JPEG", "file": "/path/to/your/image.jpg" } ``` ### Response #### Success Response (200) - **MediaObject** (MediaObject) - The created MediaObject instance. #### Response Example ```json { "mediaUri": "content://media/external/images/media/123" } ``` --- ## GET /mediaobject/uri ### Description Retrieves the media URI of the MediaObject. ### Method GET ### Endpoint /mediaobject/uri ### Response #### Success Response (200) - **mediaUri** (String) - The URI of the media. #### Response Example ```json { "mediaUri": "content://media/external/images/media/123" } ``` --- ## PUT /mediaobject/uri ### Description Sets the media URI for the MediaObject. ### Method PUT ### Endpoint /mediaobject/uri ### Parameters #### Request Body - **uri** (String) - Required - The URI to set for the media object. ### Request Example ```json { "uri": "content://media/external/images/media/456" } ``` ### Response #### Success Response (200) - **status** (String) - Indicates the success of the operation. #### Response Example ```json { "status": "success" } ``` --- ## GET /mediaobject/file ### Description Retrieves the file associated with the MediaObject. ### Method GET ### Endpoint /mediaobject/file ### Response #### Success Response (200) - **file** (File) - The File object associated with the media. #### Response Example ```json { "file": "/path/to/the/media.file" } ``` --- ## GET /mediaobject/localPath ### Description Retrieves the local path of the media file. ### Method GET ### Endpoint /mediaobject/localPath ### Response #### Success Response (200) - **localPath** (String) - The local file system path to the media. #### Response Example ```json { "localPath": "/data/user/0/com.robotemi.sdk.app/files/media.file" } ``` --- ## GET /mediaobject/mimeType ### Description Retrieves the MIME type of the media object. ### Method GET ### Endpoint /mediaobject/mimeType ### Response #### Success Response (200) - **mimeType** (MediaObject.MimeType) - The MIME type of the media. #### Response Example ```json { "mimeType": "IMAGE_JPEG" } ``` ``` -------------------------------- ### Start Face Recognition in Java Source: https://github.com/robotemi/sdk/wiki/temi-Center Initiates temi's face recognition process. Recognized face data is sent to the `OnFaceRecognizedListener` callback. Requires 'Face Recognition' permission. Supported from version 0.10.70. ```java void startFaceRecognition(); ``` -------------------------------- ### Get All Tours (Java) Source: https://github.com/robotemi/sdk/wiki/temi-Center Retrieves a list of all tours configured for the robot. An optional list of tags can be provided to filter the tours. This is a time-consuming operation and should be executed on a background thread. Requires 'Sequence' permission. ```java List getAllTours(); ``` -------------------------------- ### startTelepresence Source: https://github.com/robotemi/sdk/blob/master/docs/sdk/com.robotemi.sdk/-robot/start-telepresence.md Initiates a video call to a temi user with a specified display name, peer ID, and optionally a platform. ```APIDOC ## startTelepresence ### Description Start a video call to the temi user. ### Method POST ### Endpoint /robotemi/sdk/startTelepresence ### Parameters #### Query Parameters - **displayName** (String) - Required - Name of temi user. - **peerId** (String) - Required - ID of temi user ID. - **platform** (Platform) - Optional - Platform of the target user. Defaults to Platform.MOBILE. ### Request Example ```json { "displayName": "User Name", "peerId": "user123", "platform": "MOBILE" } ``` ### Response #### Success Response (200) - **callId** (String) - The unique identifier for the initiated call. #### Response Example ```json { "callId": "call_abc123" } ``` ``` -------------------------------- ### Start Telepresence Video Call (Kotlin) Source: https://github.com/robotemi/sdk/blob/master/docs/sdk/com.robotemi.sdk/-robot/start-telepresence.md Initiates a video call to a specified temi user. Requires the user's display name, peer ID, and optionally their platform. Returns a String indicating the call status. ```kotlin fun startTelepresence(displayName: String, peerId: String, platform: Platform = Platform.MOBILE): String ``` -------------------------------- ### Get Hard Button Mode - Kotlin Source: https://github.com/robotemi/sdk/blob/master/docs/sdk/com.robotemi.sdk/-robot/index.md Gets the current mode of a specific hard button on the robot. This function requires a HardButton type as input and returns its current Mode. It is annotated with @CheckResult. ```kotlin @CheckResult fun getHardButtonMode(type: HardButton): HardButton.Mode ``` -------------------------------- ### Create SequenceModel with Basic Properties Source: https://github.com/robotemi/sdk/blob/master/docs/sdk/com.robotemi.sdk.sequence/-sequence-model/-init-.md Creates a new SequenceModel instance with essential identifying information and optional parameters. It requires an ID, name, and description, and allows for an optional image key and a list of tags. Default values are provided for imageKey and tags if not specified. ```kotlin SequenceModel(id: String, name: String, description: String, imageKey: String = "", tags: List = emptyList()) ``` -------------------------------- ### SETTINGS Properties Source: https://github.com/robotemi/sdk/blob/master/docs/sdk/com.robotemi.sdk.constants/-page/-s-e-t-t-i-n-g-s/index.md This section outlines the available properties for the SETTINGS object, including their types and descriptions. ```APIDOC ## SETTINGS Object Properties ### Description Provides access to various settings within the Robotemi SDK. ### Properties - **name** (String) - The name of the setting. - **ordinal** (Int) - The ordinal value of the setting. - **value** (String) - The string representation of the setting's value. ``` -------------------------------- ### UserInfo Constructor Source: https://github.com/robotemi/sdk/blob/master/docs/sdk/com.robotemi.sdk/-user-info/-init-.md Provides details on the constructors available for the UserInfo class, used to create UserInfo objects with different initialization parameters. ```APIDOC ## UserInfo Constructors ### Description This section describes the constructors for the `UserInfo` class, which allow for the creation of `UserInfo` objects. ### Constructors 1. **UserInfo(parcel: Parcel)** * Description: Constructs a `UserInfo` object from a `Parcel`. * Parameters: * `parcel` (Parcel) - Required - The parcel to create the UserInfo object from. 2. **UserInfo(userId: String, name: String, picUrl: String?, role: Int)** * Description: Constructs a `UserInfo` object with the provided user ID, name, picture URL, and role. * Parameters: * `userId` (String) - Required - The unique identifier for the user. * `name` (String) - Required - The name of the user. * `picUrl` (String?) - Optional - The URL of the user's profile picture. Defaults to "". * `role` (Int) - Required - The role of the user. ### Request Example (Conceptual - Constructors don't have traditional request bodies) ```kotlin // Example for constructor 1 val parcel: Parcel = ... // Obtain a Parcel object val userInfoFromParcel = UserInfo(parcel) // Example for constructor 2 val userId = "user123" val name = "John Doe" val picUrl: String? = "http://example.com/pic.jpg" val role = 1 val userInfo = UserInfo(userId, name, picUrl, role) ``` ### Response (Conceptual - Constructors return an object) * **UserInfo Object**: A newly created `UserInfo` object with the specified properties. ``` -------------------------------- ### startMeeting Source: https://github.com/robotemi/sdk/wiki/Users-&-Telepresence Initiates a multiparty meeting using the robot's private meeting link. Participants provided will be automatically invited and admitted. Options are available to set the first participant as host and to block robot interaction during the call. ```APIDOC ## startMeeting() ### Description Start a multiparty meeting with robot's private meeting link, participants in the parameter will be invited and admitted automatically. ### Method POST ### Endpoint /startMeeting ### Parameters #### Query Parameters None #### Request Body - **participants** (List) - List of participants to invite. - **firstParticipantJoinedAsHost** (Boolean) - If true, the first participant to join will be assigned as the host. Otherwise, the launcher will be the host. - **blockRobotInteraction** (Boolean) - If true, disables certain launcher buttons during the call to prevent interruption (added in version 132). ### Request Example ```json { "example": "{ \"participants\": [ { /* ... Participant object ... */ } ], \"firstParticipantJoinedAsHost\": true, \"blockRobotInteraction\": false }" } ``` ### Response #### Success Response (200) - **String** (String) - Response code indicating success (e.g., "200 OK"). #### Error Responses - **403** (String) - Meetings permission required. #### Response Example ```json { "example": "200 OK" } ``` ``` -------------------------------- ### Manage Robotemi Sequences and Tours (Kotlin) Source: https://context7.com/robotemi/sdk/llms.txt This Kotlin code demonstrates how to manage sequences and tours using the Robotemi SDK. It covers checking permissions, fetching all sequences and tours, playing sequences with and without UI, controlling sequence playback, and handling sequence play status changes. Dependencies include the Robotemi SDK and AppCompatActivity. ```kotlin import com.robotemi.sdk.Robot import com.robotemi.sdk.sequence.SequenceModel import com.robotemi.sdk.sequence.OnSequencePlayStatusChangedListener import com.robotemi.sdk.sequence.SequenceCommand import com.robotemi.sdk.tourguide.TourModel import com.robotemi.sdk.permission.Permission import androidx.appcompat.app.AppCompatActivity import android.util.Log class SequencesActivity : AppCompatActivity(), OnSequencePlayStatusChangedListener { private lateinit var robot: Robot private var allSequences: List = emptyList() private var allTours: List = emptyList() override fun onStart() { super.onStart() robot.addOnSequencePlayStatusChangedListener(this) // Check permission if (robot.checkSelfPermission(Permission.SEQUENCE) != Permission.GRANTED) { robot.requestPermissions(listOf(Permission.SEQUENCE), 300) return } // Fetch all sequences Thread { allSequences = robot.getAllSequences() allSequences.forEach { sequence -> Log.d("Sequence", "ID: ${sequence.id}, Name: ${sequence.name}") Log.d("Sequence", "Steps: ${sequence.numberOfSteps}") } // Fetch sequences with specific tags val taggedSequences = robot.getAllSequences(tags = listOf("demo", "welcome")) }.start() // Play a sequence if (allSequences.isNotEmpty()) { val sequence = allSequences[0] // Play with player UI robot.playSequence( sequenceId = sequence.id, withPlayer = true, repeat = 0, // No repeat startFromStep = 1 // Start from first step ) // Play from specific step robot.playSequence( sequenceId = sequence.id, withPlayer = false, repeat = 2, // Repeat twice startFromStep = 3 // Start from step 3 ) } // Control sequence playback robot.controlSequence(SequenceCommand.PAUSE) robot.controlSequence(SequenceCommand.RESUME) robot.controlSequence(SequenceCommand.STOP) // Fetch all tours Thread { allTours = robot.getAllTours() allTours.forEach { tour -> Log.d("Tour", "ID: ${tour.id}, Name: ${tour.name}") } }.start() // Play a tour if (allTours.isNotEmpty()) { val result = robot.playTour(allTours[0].id) Log.d("Tour", "Play tour result: $result") } } override fun onSequencePlayStatusChanged(status: Int, sequenceId: String?) { when (status) { OnSequencePlayStatusChangedListener.IDLE -> { Log.d("Sequence", "Sequence idle") } OnSequencePlayStatusChangedListener.PLAYING -> { Log.d("Sequence", "Sequence playing: $sequenceId") } OnSequencePlayStatusChangedListener.COMPLETED -> { Log.d("Sequence", "Sequence completed: $sequenceId") } OnSequencePlayStatusChangedListener.ERROR -> { Log.d("Sequence", "Sequence error: $sequenceId") } } } override fun onStop() { robot.removeOnSequencePlayStatusChangedListener(this) super.onStop() } } ``` -------------------------------- ### UserInfo Data Class Source: https://github.com/robotemi/sdk/blob/master/docs/sdk/com.robotemi.sdk/-user-info/index.md Provides details about the UserInfo data class, including its properties and how to create instances. ```APIDOC ## UserInfo Data Class ### Description The `UserInfo` data class represents user information within the robotemi SDK. It includes essential details such as user ID, name, profile picture URL, and role. ### Properties - **userId** (String) - Required - The unique identifier for the user. - **name** (String) - Required - The name of the user. - **picUrl** (String?) - Optional - The URL of the user's profile picture. Defaults to an empty string if not provided. - **role** (Int) - Required - The role of the user, represented as an integer. ### Constructors - **UserInfo(parcel: Parcel)**: Creates a `UserInfo` object from a Parcel, used for Android's inter-process communication. - **UserInfo(userId: String, name: String, picUrl: String?, role: Int)**: Primary constructor for creating a `UserInfo` object with all its properties. ### Methods - **describeContents()**: Returns an integer bitmask indicating the set of special object types contained in this Parcelable instance's marshaled representation. (Standard Parcelable method) - **writeToParcel(parcel: Parcel, flags: Int)**: Flatten this object into a Parcel. ### Inner Objects - **CREATOR**: A `Parcelable.Creator` object that allows the creation of `UserInfo` objects from a Parcel. ``` -------------------------------- ### GET /mapImage Source: https://github.com/robotemi/sdk/wiki/Locations Retrieves the map image data. Requires 'Map' permission. ```APIDOC ## GET /mapImage ### Description Use this method to get the map image data. This endpoint returns a representation of the robot's current map as an image. ### Method GET ### Endpoint /mapImage ### Parameters None ### Request Example None ### Response #### Success Response (200) - **mapImage** (MapImage) - An object containing the map image data, potentially including format and raw image data. #### Response Example ```json { "mapImage": { "format": "PNG", "imageData": "/9j/4AAQSkZJRgABAQEA..." } } ``` ``` -------------------------------- ### getHardButtonMode Source: https://github.com/robotemi/sdk/blob/master/docs/sdk/com.robotemi.sdk/-robot/index.md Gets the current mode of a specific hard button on the robot. ```APIDOC ## GET /getHardButtonMode ### Description Gets the current mode of a specific hard button on the robot. ### Method GET ### Endpoint /getHardButtonMode ### Parameters #### Query Parameters - **type** (HardButton) - Required. The type of the hard button to query. ### Request Example ```http GET /getHardButtonMode?type=EMERGENCY_STOP ``` ### Response #### Success Response (200) - **mode** (HardButton.Mode) - The current mode of the specified hard button. #### Response Example ```json { "mode": "ACTIVE" } ``` ``` -------------------------------- ### Robotemi Obstacle Distance API Source: https://github.com/robotemi/sdk/wiki/Utils APIs to set and get the minimum obstacle distance for navigation. ```APIDOC ## POST /api/navigation/obstacle/distance ### Description Set the minimum obstacle distance for navigation. ### Method POST ### Endpoint /api/navigation/obstacle/distance ### Parameters #### Request Body - **distance** (int) - Required - The minimum distance in centimeters. ### Request Example ```json { "distance": 50 } ``` ### Response #### Success Response (200) - **status** (String) - Operation status message. #### Response Example ```json { "status": "Minimum obstacle distance set." } ``` ## GET /api/navigation/obstacle/distance ### Description Get the minimum obstacle distance for navigation. ### Method GET ### Endpoint /api/navigation/obstacle/distance ### Parameters None ### Request Example None ### Response #### Success Response (200) - **distance** (int) - The current minimum obstacle distance in centimeters. #### Response Example ```json { "distance": 50 } ``` ``` -------------------------------- ### Tours API Source: https://github.com/robotemi/sdk/wiki/Release-Info This section details how to interact with the tour features of the Robotemi SDK, including launching the tour list, retrieving all tours, and playing a specific tour. ```APIDOC ## Tour Features ### Launch Tour List Page - **Description**: Launches the main page for viewing and managing tours. - **Method**: Various (SDK function call) - **Endpoint**: N/A (SDK function) - **Usage**: Call `startPage(Page.TOURS)` ### Get All Tours - **Description**: Retrieves a list of all available tours for the robot. - **Method**: Various (SDK function call) - **Endpoint**: N/A (SDK function) - **Usage**: Call `getAllTours()` ### Play Tour - **Description**: Starts the execution of a specific tour. - **Method**: Various (SDK function call) - **Endpoint**: N/A (SDK function) - **Usage**: Call `playTour()` ``` -------------------------------- ### Robotemi Follow Speed API Source: https://github.com/robotemi/sdk/wiki/Utils APIs to set and get the speed level for the 'follow' mode. ```APIDOC ## POST /api/follow/speed ### Description Set the speed level for the 'follow' mode. ### Method POST ### Endpoint /api/follow/speed ### Parameters #### Request Body - **level** (String) - Required - The desired speed level (e.g., 'SLOW', 'NORMAL', 'FAST'). ### Request Example ```json { "level": "SLOW" } ``` ### Response #### Success Response (200) - **status** (String) - Operation status message. #### Response Example ```json { "status": "Follow speed level set." } ``` ## GET /api/follow/speed ### Description Get the current speed level for the 'follow' mode. ### Method GET ### Endpoint /api/follow/speed ### Parameters None ### Request Example None ### Response #### Success Response (200) - **level** (String) - The current speed level (e.g., 'SLOW', 'NORMAL', 'FAST'). #### Response Example ```json { "level": "SLOW" } ``` ``` -------------------------------- ### GET /mapList Source: https://github.com/robotemi/sdk/wiki/Locations Retrieves a list of all backed-up maps available on the robot. Requires 'Map' permission. ```APIDOC ## GET /mapList ### Description Use this method to get the list of the backed-up maps. This endpoint provides access to all saved map configurations stored on the robot. ### Method GET ### Endpoint /mapList ### Parameters None ### Request Example None ### Response #### Success Response (200) - **maps** (List) - A list of MapModel objects, each representing a backed-up map. #### Response Example ```json { "maps": [ { "name": "Office_Map_v1", "timestamp": "2023-10-27T10:00:00Z" }, { "name": "Warehouse_Layout", "timestamp": "2023-10-26T15:30:00Z" } ] } ``` ```