I am considering implementing rewarded video ads as a continuous full screen advertising until the user manually interrupts the otherwise endless ad sequence. I tried to implement Admob Rewarded Video Ads, one playing after the other, but it doesn't work as one could normally suppose, and worse, because it doesn't seem to be Google's expected behavior, so there doesn't seem to be any tool to implement this desired feature.
Let's see the code provided by Google's Admob:
MobileAds.initialize(this, "ca-app-pub-4824494878097656/8403117409");
// Use an activity context to get the rewarded video instance.
mRewardedVideoAd = MobileAds.getRewardedVideoAdInstance(objGloContext);
mRewardedVideoAd.setRewardedVideoAdListener(new RewardedVideoAdListener() {
@Override
public void onRewardedVideoAdLoaded() {
if (mRewardedVideoAd.isLoaded()) {
mRewardedVideoAd.show(); //this shows ad immediately
}
}
@Override
public void onRewardedVideoAdOpened() {
}
@Override
public void onRewardedVideoStarted() {
}
@Override
public void onRewardedVideoAdClosed() {
}
@Override
public void onRewarded(RewardItem rewardItem) {
}
@Override
public void onRewardedVideoAdLeftApplication() {
}
@Override
public void onRewardedVideoCompleted() {
mRewardedVideoAd.destroy(objGloContext);
mRewardedVideoAd = MobileAds.getRewardedVideoAdInstance(objGloContext);
mRewardedVideoAd.loadAd("ca-app-pub-3940256099942544/5224354917", new AdRequest.Builder().build()); //use this id for testing
}
@Override
public void onRewardedVideoAdFailedToLoad(int i) {
Toast.makeText(getApplicationContext(), "onRewardedVideoAdFailedToLoad", Toast.LENGTH_SHORT ).show();
}
});
As long as I know, Google doesn't really provide any instruction to programmatically close the ad, and destroy doesn't close it either, so
I cannot restart it recursively in onRewardedVideoCompleted()
.
Then, do you have any other idea? Thanks