Skip to content

Commit

Permalink
logs
Browse files Browse the repository at this point in the history
  • Loading branch information
armands-malejevs committed Jun 22, 2023
1 parent 5846a5e commit d8cb8c5
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -446,6 +446,7 @@ private void displayInteractiveAd(String vastUrl) {
if (player == null) {
return;
}
Log.w("truex", "Displaying interactive ad!");
WritableMap payload = Arguments.createMap();
eventEmitter.adEvent("STARTED_TRUEX", payload);

Expand All @@ -457,18 +458,21 @@ private void displayInteractiveAd(String vastUrl) {
// Start the true[X] engagement
ViewGroup viewGroup = (ViewGroup) truexOverlayFrameLayout;
truexAdManager = new TruexAdManager(getContext(), this);
truexAdManager.startAd(viewGroup, vastUrl, disableTruexRateLimit);
truexAdManager.startAd(viewGroup, vastUrl, true);
}

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

0 comments on commit d8cb8c5

Please sign in to comment.