Search code examples
androidadmobrewardedvideoadvideo-ads

Admob Reward Video Ads don't work with test devices


We want to integrate Reward Video Ads in our app (https://firebase.google.com/docs/admob/android/rewarded-video). The ads work great if we don't provide the test device. However, if we do, we receive error code 0 aka ERROR_CODE_INTERNAL_ERROR, so the execution goes through onRewardedVideoAdFailedToLoad.

Is this something somebody else has encountered?

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_video_ad);

    MobileAds.initialize(this, APP_ID);

    mAd = MobileAds.getRewardedVideoAdInstance(this);
    mAd.setRewardedVideoAdListener(this);

    AdRequest adRequest = new AdRequest.Builder()
            .addTestDevice("C67A1A9F2F19699874B7718074819FF9") // Test devices don't work work with rewarded video ads.
            .build();
    mAd.loadAd(AD_UNIT_ID, adRequest);
} 

@Override
public void onRewardedVideoAdFailedToLoad(int errorCode) {
    Toast.makeText(this, "onRewardedVideoAdFailedToLoad", Toast.LENGTH_SHORT).show();
}

Solution

  • I revisited this in November 2017 and the test device flag DOES now work with rewarded video Ads.

    You can't use test devices for rewarded video, from this forum post:

    "For Reward Videos, the following are our test Ad Unit ID:

    iOS - ca-app-pub-3940256099942544/1712485313

    Android - ca-app-pub-3940256099942544/5224354917

    Note that Reward Video Ad Unit IDs are platform specific"