Skip to content

Commit

Permalink
Add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
armands-malejevs committed May 11, 2023
1 parent 4acb828 commit 8b5aa3f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ public void displayLinearAds() {
if (this.player == null) {
return;
}
Log.w("RNV", "Display linear ads!");

WritableMap payload = Arguments.createMap();
eventEmitter.adEvent("ENDED_TRUEX", payload);
Expand All @@ -446,6 +447,7 @@ private void displayInteractiveAd(String vastUrl) {
if (player == null) {
return;
}
Log.w("RNV", "Display interactive ads!");
WritableMap payload = Arguments.createMap();
eventEmitter.adEvent("STARTED_TRUEX", payload);

Expand All @@ -460,14 +462,17 @@ private void displayInteractiveAd(String vastUrl) {
}

public void handleCheckTruex(AdEvent event) {
Log.w("RNV", "handleCheckTrueX");
if (activeAd == null) {
return;
}
boolean isTrueXAd = activeAd.getAdSystem().contains("trueX");
if (isTrueXAd && isTruexEnabled) {
Log.w("RNV", "Found trueX ad");
String vastUrl = activeAd.getDescription();
displayInteractiveAd(vastUrl);
} else if (isTrueXAd && !isTruexEnabled) {
Log.w("RNV", "Found trueX ad but skipping since TrueX is disabled!");
// Don't display interactive ads if TrueX is disabled
adsLoader.skipAd();
}
Expand Down

0 comments on commit 8b5aa3f

Please sign in to comment.