Writing Applications

Writing an application that can be run as a client within the application-manager is not that much different from writing a stand-alone QML application. It basically boils down to three additional tasks:

  1. If you write a QML application, make the root element of your QML scene an ApplicationManagerWindow (or derive your own custom root item from it).
  2. Provide a valid info.yaml file.
  3. Make the application-manager aware of your application by running appman --recreate-database.

The Root Element

It is recommended to use either an ApplicationManagerWindow or a QtObject as the root of your QML application. This is especially important, if you expect similar behavior in single- and multi-process mode. If a QtObject is used, visible base elements should still be ApplicationManagerWindows. Nevertheless other root elements are supported for convenience, as well. Here are a few things to consider:

  • Only ApplicationManagerWindows support window properties that are shared between the System-UI and the client applications.
  • In multi-porcess mode Window root elements will get a decoration (unless QT_WAYLAND_DISABLE_WINDOWDECORATION is set) and will be invisible by default. QQuick Items will be wrapped inside a Window representing a Wayland client window.
  • In single-process mode Window root elements will appear parallel to instead of inside the System-UI.

The Manifest and Updating the Database

The Manifest Definition documentation has all the information to produce a minimal info.yaml file that should get you going.

Recursively finding and parsing info.yaml files for potentially hundreds of applications can be a very time consuming task and would severely slow down application-manager's startup. Therefore, all manifest files are cached in a binary database. In order to make changes to an info.yaml file known to the application-manager, you have to force a rebuild of this database by calling appman --recreate-database.

Note: Dynamically adding/updating/removing single applications is supported via the ApplicationInstaller interface.

© 2018 Pelagicore AG. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.