Remote Device Management on Android OS
Description of the Situation
The next stage in the development of the SmartPlayer platform is the introduction of remote control functionality for devices running Android OS. This feature allows users to control the device indirectly and manage content display.
Preliminary Settings
To use the remote control functionality on a device, the user must go to the “Remote Control” settings category. In this category, find the parameter with the same name and switch it to “Enable”.

Operating Principle
To use this functionality, the user must log in to the SmartPlayer personal account.
Next, the user needs to go to the "Devices" section of the personal account and find the required device.

After clicking on the device, a toolbar will open on the right side of the screen. In this toolbar, find the line "Device Control".

After clicking "Device Control", a window will open displaying the device screen and a virtual remote control.

Using the virtual remote, the user can interact with the device and perform the required actions.
Virtual Remote Control
The virtual remote includes various buttons that affect device control. The remote contains the following buttons:
- "OK" button — confirms the selected action or moves to the next menu item (similar to the right arrow)
- Four-direction joystick (up, down, left, right) — allows navigation through device menu elements. Depending on the situation, it can: scroll, move to the next menu item, or return to the previous step
- "Back" button — returns to the previous menu item
- "Home" button — fully opens/closes the device settings menu
- Mute button — turns off the device sound
- “+” button — increases the device volume
- “-” button — decreases the device volume

Device Management
Control icons have appeared in the upper-right corner of the device screen:
- hide all windows — returns the user to the broadcast screen;
- file transfer — modal window for exchanging files with the device;
- terminal — modal window displaying device logs;
- file manager — page with access to the device file system;
- keyboard capture — activates the SmartPlayer keyboard for working with the device.

File Transfer
A special modal window that allows uploading files to the device memory.
The “File Transfer” button opens a modal window with the following parameters and information:
- drag-and-drop area for file upload;
- empty field for uploading a file via URL;
- description of the functionality;
- description of the final upload destination path.

When sending a file, the upload progress is displayed.
Terminal
The terminal uses Shell commands. Single commands are executed once. If a command runs continuously (for example, ping), the output will be periodically displayed in the terminal window.
The terminal works as a modal window in the remote control interface and displays device logs. Using icons, it can be:
- expanded to full screen;
- minimized;
- closed.

File Manager
The file manager is located within the device at a specific path corresponding to the external storage/flash drive name (this name can be found in the personal account under device information and then inserted into the path).

.
Inside the file manager, the user can manage directories using icons located in the upper-left corner of the screen:
- create folder — creates a new directory;
- go up one level — moves to the parent directory;
- refresh — updates the file manager and its contents;
- home — returns to the remote control screen.

This page displays a list of files and folders located within the device storage.

Different actions are available depending on the selected entity:
- folders — rename, delete, download;

- regular files — rename, delete, download, run;

- APK files — rename, delete, download, run, silent install (background installation);

- multiple selected files — delete, download.

Keyboard Capture
Activating keyboard capture enables capturing keystrokes — typed text is registered by the system and displayed on the screen. When activated, the system keyboard (default device keyboard) is replaced with the SmartPlayer keyboard.
To return to the system keyboard, click the globe icon at the bottom of the screen. When keyboard capture is disabled, text input in remote control mode is not possible.
Using the system keyboard is available, but text input is more complicated. Each character must be selected with a mouse click. Alternatively, text can be copied and pasted using keyboard shortcuts.

Functionality Limitations
In its current implementation, this functionality has several limitations, namely:
- Local servers only. If devices can ping each other via their local IP addresses, remote device control should work correctly.
Specific Features and Nuances of the Functionality
This section describes specific details and nuances of the functionality to help better understand its operating principles:
- Holding down the “Home” button on the remote disables “Kiosk” mode;
- Audio support is available starting from Android 10 and higher;
- Currently, remote control functionality is available even if the device status in the personal account is "off-line" (i.e., it should not be highlighted in green).
- The remote control process is partially independent from the client application, which provides certain advantages. For example: if the client application has crashed or does not start, remote control can be used to interact with the device — change system settings or install a new client application build to restore device functionality.
- If a broadcast does not start on the device, the file manager can be accessed via remote control.
- For proper operation of this functionality, the user must have root access on the device or the device firmware must be signed by the manufacturer. Most importantly, the network must be configured and access to the remote control microservice on the server must be available.
- On some devices, the virtual “+” and “-” buttons may not function. This is due to hardware limitations of the device. Volume can be adjusted in the personal account via the broadcast settings or using the physical remote control of the set-top box.
- When repeatedly pressing a button quickly, the device stores all presses but displays them with a delay. For example, if the user presses the up arrow five times, the device will perform all five actions but with a one-second delay after each step. This behavior is a limitation of Android OS.
- Some executable files located within the storage can be launched.
Video Instruction
Remote device control on Android OS
Final Result
The user understands and is able to use remote control on devices running Android OS.
Demonstration Video
https://education_tutorial.hb.ru-msk.vkcs.cloud/Screencast%20from%2014.06.2024%2012%3A28%3A37.webm