I'm trying to modify the AdsHelper class for traditional rewarded video ads and to add some events. I'm having trouble figuring out how to call a sub in the AdsHelper class from a class within the inline java. Does anyone know how to do this?
Here is what I get:
B4X:
Sub RewardedAd_ReceviedAd
Log("RewardedAd_ReceviedAd")
End Sub
Java:
public static class MyRewardedAdCallback extends RewardedAdLoadCallback {
public RewardedAd ad;
[USER=69643]@override[/USER]
public void onAdFailedToLoad(LoadAdError adError) {
BA.Log("Failed to load RewardedVideoAd: " + adError);
}
[USER=69643]@override[/USER]
public void onAdLoaded(RewardedAd ad) {
BA.Log("RewardedVideoAd received");
processBA.raiseEventFromUI(this, "rewardedad_receivedad", Null);
this.ad = ad;
}
}
Here is what I get:
Compiling generated Java code. Error
src\mindware\mindgames\adshelper.java:1100: error: cannot find symbol
processBA.raiseEventFromUI(this, "rewardedad_receivedad", Null);
^
symbol: variable Null
location: class MyRewardedAdCallback
Note: src\mindware\mindgames\main.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
javac 11.0.1