I am working with the AdMob-Plus plugin and trying to integrate the RewardedAd as shown here.
THE ISSUE:
I want to offer 3 coins for every RewardedAd watched. My main issue is that I am unable to figure out how to track successfully after a user has watched a complete RewardedAd and increment the existing count of the coins in the user account by adding the new coin value to it and show this new value to the user in the UI.
EXAMPLE:
If the user already has 6 coins in his account and watches a RewardedAd, then his account should show the new balance as 9 coins. How can I achieve this?
THE CODE THAT I HAVE TRIED SO FAR:
async loadRewardsAd(): Promise<void> {
this.rewarded = new this.admob.RewardedAd({
adUnitId: this.adRewardedId,
serverSideVerification: {
customData: 'coin=3',
userId: '1234567',
}
});
// Load rewarded
await this.rewarded.load();
// Display rewarded
await this.rewarded.show();
}
As far as I see there is no option to get the total amount to display in the ad but only the fresh rewarded points like shown here:
this is the same code in Kotlin:
Beware the hint on the top of the page:
Getting the total amount seems to require to login into the AdMob Reporting API, which is not available for common viewers: admob/api
The reporting by the cordova-admop api seems even to be impossible, I never found any functionality for it.