Skip to content

Commit

Permalink
Facebook/6.17.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins committed Mar 28, 2024
1 parent 754c63f commit 8e5eb78
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 29 deletions.
4 changes: 4 additions & 0 deletions Facebook/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 6.17.0.0
* Certified with Facebook SDK 6.17.0.
* Remove deprecated callbacks `onRewardedAdVideoStarted()`, `onRewardedAdVideoCompleted()`, `onRewardedInterstitialAdVideoStarted()` and `onRewardedInterstitialAdVideoCompleted`.

## 6.16.0.2
* Fix native banner ad media views not clickable.

Expand Down
4 changes: 2 additions & 2 deletions Facebook/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ plugins {
}

private val versionMajor = 6
private val versionMinor = 16
private val versionMinor = 17
private val versionPatch = 0
private val versionAdapterPatch = 2
private val versionAdapterPatch = 0

val libraryVersionName by extra("${versionMajor}.${versionMinor}.${versionPatch}.${versionAdapterPatch}")
val libraryVersionCode by extra((versionMajor * 1000000) + (versionMinor * 10000) + (versionPatch * 100) + versionAdapterPatch)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,8 @@ public class FacebookMediationAdapter
private RewardedVideoAd mRewardedVideoAd;
private RewardedVideoAd mRewardedInterAd;

private final AtomicBoolean onInterstitialAdHiddenCalled = new AtomicBoolean();
private final AtomicBoolean onRewardedAdVideoCompletedCalled = new AtomicBoolean();
private final AtomicBoolean onRewardedAdHiddenCalled = new AtomicBoolean();
private final AtomicBoolean onInterstitialAdHiddenCalled = new AtomicBoolean();
private final AtomicBoolean onRewardedAdHiddenCalled = new AtomicBoolean();

// Explicit default constructor declaration
public FacebookMediationAdapter(final AppLovinSdk sdk)
Expand Down Expand Up @@ -329,12 +328,7 @@ public void onRewardedVideoCompleted()
{
log( "Rewarded interstitial ad video completed: " + placementId );

if ( onRewardedAdVideoCompletedCalled.compareAndSet( false, true ) )
{
listener.onRewardedInterstitialAdVideoCompleted();

hasGrantedReward = true;
}
hasGrantedReward = true;
}

@Override
Expand All @@ -343,7 +337,6 @@ public void onLoggingImpression(final Ad ad)
log( "Rewarded interstitial ad logging impression: " + placementId );

listener.onRewardedInterstitialAdDisplayed();
listener.onRewardedInterstitialAdVideoStarted();
}

@Override
Expand All @@ -355,11 +348,6 @@ public void onRewardedVideoActivityDestroyed()
// We will not reward the user if Activity is destroyed - this may be due to launching from app icon and having the `android:launchMode="singleTask"` flag
//

if ( onRewardedAdVideoCompletedCalled.compareAndSet( false, true ) )
{
listener.onRewardedInterstitialAdVideoCompleted();
}

if ( onRewardedAdHiddenCalled.compareAndSet( false, true ) )
{
listener.onRewardedInterstitialAdHidden();
Expand Down Expand Up @@ -785,12 +773,7 @@ public void onRewardedVideoCompleted()
{
log( "Rewarded ad video completed" );

if ( onRewardedAdVideoCompletedCalled.compareAndSet( false, true ) )
{
listener.onRewardedAdVideoCompleted();

hasGrantedReward = true;
}
hasGrantedReward = true;
}

@Override
Expand All @@ -799,7 +782,6 @@ public void onLoggingImpression(final Ad ad)
log( "Rewarded ad logging impression: " + ad.getPlacementId() );

listener.onRewardedAdDisplayed();
listener.onRewardedAdVideoStarted();
}

@Override
Expand All @@ -811,11 +793,6 @@ public void onRewardedVideoActivityDestroyed()
// We will not reward the user if Activity is destroyed - this may be due to launching from app icon and having the `android:launchMode="singleTask"` flag
//

if ( onRewardedAdVideoCompletedCalled.compareAndSet( false, true ) )
{
listener.onRewardedAdVideoCompleted();
}

if ( onRewardedAdHiddenCalled.compareAndSet( false, true ) )
{
listener.onRewardedAdHidden();
Expand Down

0 comments on commit 8e5eb78

Please sign in to comment.