📌Note: The code for the remote screen SDK is moved to https://github.com/teamviewer/iotagentsdk. Further updates and documentation can be found on GitHub.
TeamViewer provides the option to access the content of the screen of a custom Qt Application on the Edge Device. This is realized through the TeamViewer Remote Screen SDK. This SDK is directly linked to the application and so enables the connection to the TeamViewer Embedded Agent on the edge device and so to the TeamViewer Cloud.
The TeamViewer Remote Screen SDK is released under MIT License allowing an easy integration of our source code.
To create Qt applications Qt licenses are needed.
Make sure that you have prepared the following points:
For building the whole package the following libraries and tools need to be installed:
On debian systems (Version 10) the following development packages are used for building:
Download the TeamViewer Remote Screen SDK
Extract the SDK in a suitable folder on the edge device.
To build the remote screen SDK make sure that all required libraries and dependencies are installed and available.
Access the edge device remotely (Access the Edge Device via Remote Terminal).
1. Create and navigate to the build directory. In the terminal type in the following commands and press return:
mkdir build cd build
2. Run cmake. In the terminal type in the following command and press return. Replace path (PATH
) with the path where your previously extracted SDK is located.
cmake PATH
3. Run make. In the terminal type in the following command and press return.
make
After building the package there should be two binaries:
libTVQtRC.so
– integration plugin, used by a Qt application for providing Remote Screen capabilitiesqt_simulate
– an example application showing the basic usage of the pluginThe SDK can also be installed to be used in a development environment.
Run make. In the terminal type in the following command and press return.
sudo make install
The default installation prefix for cmake is /usr/local
. After installation there are two projects installed:
/lib/lbTVQtRC.so
) along with the public headers (/include/*.h
).To install the SDK into a custom prefix override CMAKE_INSTALL_PREFIX
when configuring the SDK before building. For example:
cmake -DCMAKE_INSTALL_PREFIX=
The TeamViewer Embedded Agent needs then to be configured to remote control an external application. This configuration involves also specifying a so-called Image Grab Strategy. The agent tells the application in what way it expects image updates.
In the terminal type in the following commands and press return.
sudo teamviewer-iot-agent configure set EnableRemoteScreen 1 sudo teamviewer-iot-agent configure set RemoteScreenChannels "EAP"
That the value in escaped double quotes (“) can vary from user case. The values could be:
The TeamViewer Embedded Agent currently supports the following strategies:
EAP
)
FrameBuffer-Pull
or the channel setting FBPull
)
FrameBuffer-Pull
or the channel setting FBPull
)
After starting the agent its API for remote screen is now available and can be used by the Qt plugin.
After installing the TeamViewer Embedded Agent it creates a system group called tv_api
. Every application that wants to communicate with the agent needs to run under a user that is part of the before mentioned system group.
Add the current user to group tv_api
. In the terminal type in the following commands and press return.
usermod -a -G tv_api $USER
For more information about the different channel configurations and their use, see Set up the Remote Screen via Framebuffer.
In the package for the SDK is an example application included. This example show the basic operations of the SDK and how to integrate the plugin into a Qt Quick based application. It requires Qt 5.3 with the modules Qt Quick 2.3 and Qt Quick Window 2.0 to run.
On debian based distributions the following packages are required to run:
To start the example application:
With the example application, one can also test and see the basic operations:
Set Full Control
(image updates and input), Set View Only
(image updates, no input), Disable Remote Control
(no image updates, no input)Contact TeamViewer Embedded Support ⟨[email protected]⟩ if you encounter problems when using the remote screen SDK.
On some ARM-based devices, the colors may seem inverted or appear wrong on the client’s side.
When the RemoteScreenChannels
setting is configured with EAP:FBPush
, it may happen that the client picture is sometimes not refreshed appropriately during a TeamViewer session. Resizing the window will force an update and will display the actual content of the application in the client window.
For more information about the different channel configurations and their use, see Set up the Remote Screen via Framebuffer.