# Remote Control

## Remote Control and Remote View <a href="#remote-control-and-remote-view" id="remote-control-and-remote-view"></a>

### Overview <a href="#overview" id="overview"></a>

The BlueFletch Portal provides device administrators with the capability to view or control their users' mobile devices from a web browser. In Remote View mode, an admin can see the behavior of the device as it is used. In Remote Control mode, an admin can interact with the device via touch, Android buttons (**Back**, **Home**, **Recents**), and BlueFletch Enterprise plays.

### Requirements <a href="#requirements" id="requirements"></a>

* Zebra devices, or devices with signed BlueFletch Platform Services integration, running Android 8.1 or higher.
* Remote Control Agent APK (package name: com.bluefletch.ems.emm.remoteagent) is installed on the devices and granted [permissions](/bluefletch-enterprise/product-guides/device-applications/device-remote-control/technical-guide.md#permissions).
* Messaging APK (package name: com.bluefletch.ems.messaging) is installed on the devices and started.
* Remote Control feature for the organization's Portal has been turned on by a BlueFletch account manager.

### Initiating Remote Session <a href="#initiating-remote-session" id="initiating-remote-session"></a>

Remote Control can be started on the BlueFletch Portal from three locations: ***Device Details***, the ***Playbook MDM Devices*** tab, and (if the organization is enrolled in Android Enterprise) the ***EMM Console Devices*** tab.

***Device Details*** displays a **Remote Control** button that initiates the session. Both ***Devices*** tabs have a **Remote Control** menu option within each device's respective ***Device Summary*** page.

<figure><img src="/files/79YGjixHMkjuz3bnKbGf" alt="" width="563"><figcaption></figcaption></figure>

Upon initiating the remote session, the web browser opens a new window and connects to the device via Messaging. When the device successfully receives the MQTT message from the browser, it displays a prompt asking the device-side user to grant permission for the Remote Agent application to begin capturing the screen. If this prompt does not display immediately, the admin on the Portal-side can press **Retry Video**.

On Zebra devices, the Remote Agent will automatically trigger the prompt to grant the video permission. Remote Agent will also wake a Zebra device if it is sleeping so that the automatic grant action can occur; the device will still require user intervention if it has a screenlock.

### Active Remote Session <a href="#active-remote-session" id="active-remote-session"></a>

Once a Remote View session is started, the device can be viewed and the **End Session** button is available when ready to terminate the connection.

Once a Remote Control session is started, the admin has various options to control the device.

#### Controls & Actions <a href="#controls-actions" id="controls-actions"></a>

Device controls include:

* **Reboot**
* **Volume Up**
* **Volume Down**
* **Wake/Sleep Device**
* **Screenshot**
* **Home** (replacement for Android **Home** button if the device has hardware buttons)
* **Back** (replacement for Android **Back** button)
* **Recents** (replacement for Android **Recents** button)

The **Actions** selector contains fields for all the play types available through BlueFletch Enterprise. They can be run as one-time events on the device. Read the complete details on the different types of plays and their requirements [here](/bluefletch-enterprise/product-guides/portal/playbook-mdm/plays.md#actions-fields).

<figure><img src="/files/Ve7Q0zpLW1Cx08IyMLf3" alt="" width="563"><figcaption></figcaption></figure>

#### Logged-in State <a href="#logged-in-state" id="logged-in-state"></a>

Zebra devices can report the authentication state of the device to the BlueFletch Enterprise database, and the Remote View or Control session can display the current user below the screen display.

To configure a device to report the login and logout actions, include the following intents in your launcher.json configuration file:<br>

```
"intents": {
    "login": [
        {
            "action": "com.bluefletch.ems.remote.ACTION_LOGIN",
            "package": "com.bluefletch.ems.emm.remoteagent",
            "typeIntent": "b"
        }
    ],
    "postLogout": [
        {
            "action": "com.bluefletch.ems.remote.ACTION_LOGOUT",
            "package": "com.bluefletch.ems.emm.remoteagent",
            "typeIntent": "b"
        }       
    ]    
```

For more details on the key-value pairs within these intents, please see the documentation on [Custom Intents](/bluefletch-enterprise/product-guides/bluefletch-launcher/launcher3/technical-guide.md#custom-intents) for Launcher Configurations.

### Terminating Remote Session <a href="#terminating-remote-session" id="terminating-remote-session"></a>

To conclude the remote connection, press the **End Session** button in the lower right corner and confirm the intention to close in the dialog displayed. The browser window that was launched for the session will close.

<figure><img src="/files/wUB7ti9uAWeX10fdnG7z" alt="" width="563"><figcaption></figcaption></figure>


---

# 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/portal/remote-control.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.
