Skip to content

Commit

Permalink
GoogleAdManager/20.5.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
prod-applovin-deploy committed Feb 21, 2022
1 parent c53cb15 commit 0a41466
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
3 changes: 3 additions & 0 deletions GoogleAdManager/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 20.5.0.6
* Add support for sending ad size information for adview ads. This value can be retrieved in the `onAdLoaded()` callback using `getSize()` from `MaxAd.java` available in MAX SDK v11.2.0.

## 20.5.0.5
* Add support for new `MaxNativeAdView` constructor taking in non-Activity context.

Expand Down
2 changes: 1 addition & 1 deletion GoogleAdManager/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
private val versionMajor = 20
private val versionMinor = 5
private val versionPatch = 0
private val versionAdapterPatch = 5
private val versionAdapterPatch = 6

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 @@ -830,12 +830,23 @@ public void onAdLoaded()
{
log( adFormat.getLabel() + " ad loaded: " + placementId );

ResponseInfo responseInfo = adView.getResponseInfo();
String responseId = ( responseInfo != null ) ? responseInfo.getResponseId() : null;
if ( AppLovinSdk.VERSION_CODE >= 9150000 && AppLovinSdkUtils.isValidString( responseId ) )
if ( AppLovinSdk.VERSION_CODE >= 9150000 )
{
Bundle extraInfo = new Bundle( 1 );
extraInfo.putString( "creative_id", responseId );
Bundle extraInfo = new Bundle( 3 );

ResponseInfo responseInfo = adView.getResponseInfo();
String responseId = ( responseInfo != null ) ? responseInfo.getResponseId() : null;
if ( AppLovinSdkUtils.isValidString( responseId ) )
{
extraInfo.putString( "creative_id", responseId );
}

AdSize adSize = adView.getAdSize();
if ( adSize != null )
{
extraInfo.putInt( "ad_width", adSize.getWidth() );
extraInfo.putInt( "ad_height", adSize.getHeight() );
}

listener.onAdViewAdLoaded( adView, extraInfo );
}
Expand Down

0 comments on commit 0a41466

Please sign in to comment.