Rewards ads was not loading every time with Testing id

302 views
Skip to first unread message

Kabil Mobile Tech

unread,
Jun 12, 2019, 9:30:08 AM6/12/19
to google-adm...@googlegroups.com
Hi Team
   I have integrated Rewards video ads to my project, but every time it was not loading. Please help me for solution. I have posted my code below...

   private static final String AD_UNIT_ID = "ca-app-pub-3940256099942544/5224354917";
  private static final String APP_ID = "ca-app-pub-3940256099942544~3347511713";
private RewardedVideoAd rewardedVideoAd;

  onCreate {
  
  MobileAds.initialize(this, APP_ID);
rewardedVideoAd = MobileAds.getRewardedVideoAdInstance(getApplicationContext());
rewardedVideoAd.setRewardedVideoAdListener(this);
loadRewardedVideoAd(); }
@Override
public void onPause() {
super.onPause();
rewardedVideoAd.pause(this);
}

@Override
public void onResume() {
super.onResume();
rewardedVideoAd.resume(this);
}

private void loadRewardedVideoAd() {
Log.e("reward", "loadRewardedVideoAd");
if (!rewardedVideoAd.isLoaded()) {
rewardedVideoAd.loadAd(AD_UNIT_ID, new AdRequest.Builder().build());
}
}
    @Override
public void onRewardedVideoAdLeftApplication() {
Log.e("reward", "onRewardedVideoAdLeftApplication");
}

@Override
public void onRewardedVideoAdClosed() {
Log.e("reward", "onRewardedVideoAdClosed");
// loadRewardedVideoAd();
rewardedVideoAd.destroy(this);
finish();
}
    @Override
public void onRewardedVideoAdFailedToLoad(int errorCode) {
Log.e("reward", "onRewardedVideoAdFailedToLoad");
}

@Override
public void onRewardedVideoAdLoaded() {
// showRewardedVideoAd();
Log.e("reward", "onRewardedVideoAdLoaded");
rewardedVideoAd.show();
}
   @Override
public void onRewardedVideoAdOpened() {
Log.e("reward", "onRewardedVideoAdOpened");
}
    @Override
public void onRewarded(RewardItem reward) {
Log.e("reward", "onRewarded");
sent_points();
}
    @Override
public void onRewardedVideoStarted() {
// Toast.makeText(this, "onRewardedVideoStarted", Toast.LENGTH_SHORT).show();
}
Most of the times it was not working, only few times it was showing. I did't receive any error message, but onRewardedVideoAdLoaded was not calling few times. Can you please help me team. Thanks in advance.

Mobile Ads SDK Forum Advisor Prod

unread,
Jun 12, 2019, 3:34:40 PM6/12/19
to kabi...@rgmobiles.com, google-adm...@googlegroups.com
Hello there,

Thanks for reaching out to us. I was able to load ads with our test Ad unit Ids using our sample apps without any issues. I have not found any issues with your code snippet. However, can you try with our sample apps once and then let us know? Also, can you check what error is being thrown when the ad fails via onRewardedVideoAdFailedToLoad()?

Regards,
Deepika Uragayala
Mobile Ads SDK Team
 

ref:_00D1U1174p._5001UBmtbT:ref

Kabil Mobile Tech

unread,
Jun 13, 2019, 9:42:31 AM6/13/19
to Mobile Ads SDK Forum Advisor Prod, google-adm...@googlegroups.com
Hi Team
     Did you guys checked the issue sir. Because it was not working few times and few times working. Need to overcome the issue, so can you please help me on this.

Thanks and Regards
Kabil Dev

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/fT7gj000000000000000000000000000000000000000000000PT03P800bxV0rPpzRWOP8gxVyv42ow%40sfdc.net.


--
P. Kabil dev
Android Application Developer
SMITIV Mobiles Technologies OPC Private Limited
Coimbatore

Mobile Ads SDK Forum Advisor Prod

unread,
Jun 13, 2019, 12:24:04 PM6/13/19
to kabi...@rgmobiles.com, google-adm...@googlegroups.com
Hello there,

Thanks for getting back to us. Ad serving may depends on many factors like your internet connection and the device on which you are testing and the location. Sometimes, you will not be able to load an ad because of the lack of inventory. In such cases, you have to check the device logs to see what error is being thrown to find the reason. Can you check on a different device and see if you are able to load ads? I tested this on a PIXEL and Samsung Galaxy device several time. Is your app live on Playstore? If your app is not live in Playstore yet, please make sure that you enable test device   while testing. When you enable test mode and test your Ad unit Ids with our sample apps  , you will see a production looking ad with a "Test Ad" label and that confirms that your Ad unit Ids are working. 

Kabil Mobile Tech

unread,
Jun 13, 2019, 2:03:21 PM6/13/19
to Mobile Ads SDK Forum Advisor Prod, google-adm...@googlegroups.com
Hi Team

In such cases, you have to check the device logs to see what error is being thrown to find the reason. 
         Actually i did't received error code, it moves to onRewardedVideoAdLoaded method, but it was not opening. I have checked with error code on Log, but there is no error was returned.


 Can you check on a different device and see if you are able to load ads? 
        I have cheeked with Different devices (Android 9.0, 8.0, 7.0. 5.5.1), but still the same problem. Ad was showing on few times, then it was not loaded.


Is your app live on Playstore? 
    Yes. Please search on "SwypeOn" at Google play store.(But admob not integrated)

Conclusion:
   On few times, whenever i opened ads, it not moves opens method.Only it shows Loaded method, some times Loaded method also not showing. It was staying on same screens more and more time. If the error code was received, i will be searching based on that error code sir. But it was moves into Loaded method, ads only not showing. I always using Test Id.
 
Thanks and Regards

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.

Mobile Ads SDK Forum Advisor Prod

unread,
Jun 13, 2019, 5:07:23 PM6/13/19
to kabi...@rgmobiles.com, google-adm...@googlegroups.com
Hello there,

You are seeing intermittent fills which means that there should be an issue with the Ad serving with the Ad unit Ids. I would suggest that you reachout to AdMob Help Forum or you can reachout to the Product Support Team via this troubleshooter so that the Ad serving team will assist you further.
Reply all
Reply to author
Forward
0 new messages