Components

The Qt Digital Advertising is designed as QML module that offers easy to use API to include advertising content in your application. This can be achieved with embedded and mobile components that are briefly described in this chapter. Both of these components are visual items representing advertisement content. For those new to QML and Qt Quick, please see Qt Quick documentation first for an introduction to QML applications.

Note: In this chapter, embedded and mobile sections refer only to its specific features, while common ones are introduced in the shared section.

EmbeddedConfig

EmbeddedConfig is an configuration item designed for EmbeddedAd. It allows to configure parameters in one place which will be shared among all EmbeddedAd instances

Below properties are mandatory to run configure and run advertisements.

  • qdaApiKey - api key which is delivered after registration process.
  • venueId - user-defined ID of the venue that is making the ad request.

EmbeddedAd

EmbeddedAd is an advertisement item designed for embedded applications.

To properly display advertisements following properties needs to be set up:

  • deviceId - user-defined ID of the device, unique for each network ID.
  • displayAreaId - property used as ID in the context of multiple display areas.

Following properties are noteworthy for the most of the applications:

  • mediaWidth/Height - indicates ad content size to be requested from the media server.
  • supportedImage/Video/AudioFormats - indicates ad content formats to be requested from the media server.
  • adPropertiesId - indicates which ad properties to load from the file.

For more information, please see EmbeddedAd QML Type.

MobileConfig

EmbeddedConfig is an configuration item designed for MobileConfig. It allows to configure parameters in one place which will be shared among all MobileConfig instances

Below properties are mandatory to run configure and run advertisements.

  • qdaApiKey - api key which is delivered after registration process.
  • networkId - holds format ID which indicates exact network id.
  • siteId - holds format ID which indicates exact site id.
  • appName - holds application name.
  • bundleId - indicates application bundle name e.g. com.test.myApp.

MobileAd

MobileAd is an advertisement item designed for mobile applications.

Following properties are noteworthy for the most of the applications:

  • formatId - holds format ID which indicates exact ad content size to be requested from the media server.
  • pageId - indicates page ID.

For more information, please see MobileAd QML Type.

Shared

Embedded and mobile ad share some properties, signals and methods, e.g.:

  • playMode - indicates when an ad will be run e.g. immediately or on idle.
  • displayMode - indicates how an ad will be run e.g. once or in a loop.
  • play/stop() - triggers/stops running of an ad.
  • advertisementEnded() - signal emitted when an ad ends.
  • inactivityTime - indicates time needed to pass to trigger idle state, in milliseconds.

Moreover ad components inherit properties, signals and methods from Item.

Note: For correct setup, API Key needs to be provided.

For more information, please see API Reference.

© 2022 The Qt Company Ltd. 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.