Rewarded
View as Markdown
Ask AI about this page
Rewarded placements play a video the user opts into in exchange for an in-app reward (coins, an extra life, a hint).
// Preload, for example when the shop screen opensQartveloAds.loadRewarded("reward_coins")
// The user taps "Watch a video for 50 coins"QartveloAds.showRewarded(activity, "reward_coins", object : QartveloAdsListener { override fun onReward(info: QartveloAdsAdInfo, reward: QartveloAdsReward) { grantCoins(50) // exactly once, only after completion } override fun onDismissed(info: QartveloAdsAdInfo) = resumeGame() override fun onNoAdAvailable(placementId: String, format: AdFormat) = showNoVideoMessage() override fun onLoadFailed(placementId: String, error: QartveloAdsError) = showNoVideoMessage()})Use QartveloAds.isRewardedReady("reward_coins") to enable or hide the “watch a video” button.
Reward guarantees
Section titled “Reward guarantees”onRewardfires at most once per show and only after confirmed completion, whether Qartvelo Ads or the AdMob fallback served the ad.- Qartvelo Ads rewards are
QartveloAdsReward(type = "reward", amount = 1). AdMob rewards carry the type and amount configured on your AdMob unit (onUserEarnedRewardis mapped toonReward). Most apps ignore the amount and grant their own fixed reward. - Closing a Qartvelo Ads video early asks the user for confirmation and forfeits the reward.
- Rotation and Activity re-creation neither restart the video nor repeat events.
- The SDK reports the completion to the backend (
POST /events/reward) for auditing; your app should grant the reward from the callback, not wait for the server.
Video playback
Section titled “Video playback”Qartvelo Ads rewarded videos are MP4 (H.264), 5 to 60 seconds long, played full-screen with Media3 ExoPlayer from a file downloaded before onLoaded. Playback never starts streaming over a slow network.