# Technical Guide

The BlueFletch Remote Control allows administrators to view and interact with mobile devices through the BlueFletch Portal, currently limited to Zebra devices and those with BlueFletch Platform Services integration. The application offers configurable settings to tailor permissions and meet specific security requirements.

### Configurations

Include the following settings in the **remoteControl** object within the Launcher Configuration file:

| Field                | Value                                                                                                                                                                                                                                                                              |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| logLevel             | <p><strong>string</strong> Indicates device log level. Valid values are "debug", "info", or "error"; default is “info”. If this value is not set, Remote Control will read from the Launcher Configuration Settings "logLevel". <br>Introduced in Remote Control version 2.72.</p> |
| videoPointsOverride  | <p><strong>string</strong> Allows for setting screen points to automate a press of the video permissions button. Value are X,Y coordinates of the "ok"/"allow" button.<br>e.g <code>"1277,722"</code></p>                                                                          |
| host                 | **string** Allows for changing the host for the APIs that Remote Control uses. Talk to BFE customer success before changing this value.                                                                                                                                            |
| allowTokenReuse      | **boolean** Indicates that the Twillio access token can be used. Default is false.                                                                                                                                                                                                 |
| allowUserStop        | **boolean** Indicates that the device user can  stop a remote session. Default is false.                                                                                                                                                                                           |
| promptIfUserLoggedIn | **boolean** If value set to true, if a user is logged into a device, Remote Control will prompt the user to allow or deny remote control access.  Default is false. Introduced in version 2.8.6.                                                                                   |

The **remoteControl** object and all key-value pairs included in it, unless otherwise noted, were introduced in Remote Control 2.4.0 and Launcher 3.20.12.

### Application Details <a href="#application-details" id="application-details"></a>

**Package:** com.bluefletch.ems.emm.remoteagent

#### Setup <a href="#setup" id="setup"></a>

Install package and apply the appropriate [permissions](#permissions).

**Intents**

`com.bluefletch.ems.remotecontrol.ACTION_INIT` to accomplish initial permissions setup. Only valid on Zebra devices. Is a one time intent.

`com.bluefletch.ems.remotecontrol.ACTION_START` to start foreground service to run, which will request video permissions.

`com.bluefletch.ems.remotecontrol.ACTION_STOP` to stop the foreground service and any remote capture processing.

**Example ADB Command**

```
adb shell am start -n com.bluefletch.ems.emm.remoteagent/com.bluefletch.ems.remotecontrol.MainActivity
```

**Example AirWatch Command**

```
mode=explicit,action=android.action.intent.MAIN,package=com.bluefletch.ems.emm.remoteagent,class=com.bluefletch.ems.remotecontrol.MainActivity,broadcast=false
```

#### Permissions <a href="#permissions" id="permissions"></a>

For Android 10 and above, permission **SYSTEM\_ALERT\_WINDOW** is required for Remote Control to properly function.

**Permissions via ADB**

```
adb shell pm grant com.bluefletch.ems.emm.remoteagent android.permission.WRITE_EXTERNAL_STORAGE
adb shell pm grant com.bluefletch.ems.emm.remoteagent android.permission.READ_EXTERNAL_STORAGE
adb shell pm grant com.bluefletch.ems.emm.remoteagent android.permission.READ_PHONE_STATE
adb shell pm grant com.bluefletch.ems.emm.remoteagent android.permission.SYSTEM_ALERT_WINDOW
```

**Permission via SOTI**

```
afw_set_permission_grant_state com.bluefletch.ems.emm.remoteagent android.permission.READ_PHONE_STATE allow
afw_set_permission_grant_state com.bluefletch.ems.emm.remoteagent android.permission.READ_EXTERNAL_STORAGE allow
afw_set_permission_grant_state com.bluefletch.ems.emm.remoteagent android.permission.WRITE_EXTERNAL_STORAGE allow
afw_set_permission_grant_state com.bluefletch.ems.emm.remoteagent android.permission.SYSTEM_ALERT_WINDOW allow
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bluefletch.com/bluefletch-enterprise/product-guides/device-applications/device-remote-control/technical-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
