static String eventName;
static B4AClass target;
public void setCallback(String s, B4AClass target) {
BA.Log("setCallback");
eventName = s.toLowerCase(BA.cul);
this.target = target;
}
public static class MyRewardedAdCallback extends RewardedAdLoadCallback {
public RewardedAd ad;
@Override
public void onAdFailedToLoad(LoadAdError adError) {
BA.Log("Failed to load RewardedVideoAd: " + adError);
target.getBA().raiseEventFromDifferentThread(target, null, 0, eventName + "_failedtoreceivead", false, new Object[] {adError});
}
@Override
public void onAdLoaded(RewardedAd ad) {
BA.Log("RewardedVideoAd received");
target.getBA().raiseEventFromDifferentThread(target, null, 0, eventName + "_receivead", false, null);
this.ad = ad;
}
}