RewardedAd QML Type
Full screen advertisement with reward. More...
Import Statement: | import QtDigitalAdvertising |
Inherits: |
Properties
- adUnitId : QString
- customData : QString
- keywords : QStringList
- nonPersonalizedAds : bool
- testDevicesIds : QStringList
Signals
- void clicked()
- void closed()
- void loadError(int errorId)
- void loaded()
- void loading()
- void rewarded(QString type, int amount)
Methods
Detailed Description
The RewardedAd module offers easy to include full screen advertisement with reward in your application. To use this module in your Qt Quick application, add the following import statement to your QML file.
import QtDigitalAdvertising 2.0
The advertisement requested from a media server are based on the set up properties. Bare-minimum plugin properties set-up:
RewardedAd{ adUnitId: "/21775744923/example/rewarded_interstitial" Connections{ target: rewarded function onRewarded(type, amount) {console.log("QDA: RewardedAd, type: "+type+", amount:" + amount)} } }
Property Documentation
adUnitId : QString |
[Required] This property holds adUnitId
customData : QString |
[Optional] This porperty holds string for server-side verification (SSV) callbacks
keywords : QStringList |
[Optional] This property holds list of key-value pairs that you can pass within your request for targeting
nonPersonalizedAds : bool |
[Optional] This property indicates are allowance of personalied ads.
testDevicesIds : QStringList |
This property holds list of test devices ids. To find you test device id check the application output for a message like:
I/Ads: Use RequestConfiguration.Builder.setTestDeviceIds(Arrays.asList("33BE2250B43518CCDA7DE426D04EE231")) to get test ads on this device."
Signal Documentation
void clicked() |
This signal is emitted when the advertisement was clicked.
Note: The corresponding handler is onClicked
.
void closed() |
This signal is emitted when the advertisement was closed by the user.
Note: The corresponding handler is onClosed
.
void loadError(int errorId) |
This signal is emitted when the error occurs with errorId.
Note: The corresponding handler is onLoadError
.
void loaded() |
This signal is emitted when the advertisement is successfully loaded.
Note: The corresponding handler is onLoaded
.
void loading() |
This signal is emitted when the advertisement begins to load.
Note: The corresponding handler is onLoading
.
void rewarded(QString type, int amount) |
This signal is emitted when a reward type was given with amount.
Note: The corresponding handler is onRewarded
.
Method Documentation
bool isLoaded() |
Return is advertisement the loaded.
void load() |
Triggers loading the advertisement.
void show() |
Triggers playing advertisement if plugin not displaying advs currently.
© 2024 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.