Skip to content

UnityAds Adapter: 4.18.0 api migration#3

Merged
AnwarissaAsbah merged 8 commits into
feat/unity-dynamic-banner-sizefrom
feat/unity-4.18.0
Jun 29, 2026
Merged

UnityAds Adapter: 4.18.0 api migration#3
AnwarissaAsbah merged 8 commits into
feat/unity-dynamic-banner-sizefrom
feat/unity-4.18.0

Conversation

@AnwarissaAsbah

Copy link
Copy Markdown

Update banner implementation to use the new apis

@lmoreault lmoreault left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly LGTM, just small nit picks or comments 👍

privacyMetaData.set( "privacy.mode", "mixed" );
privacyMetaData.commit();
// No COPPA trafic supported
UnityAds.setNonBehavioral(false);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we really hard code this to false? @UnitySteven Do you recall if we should be explicit here like this or keep it not set? (we didn't set it before)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updating it. Initially, the privacy team requested that its hard coded to false then got back to us and asked us to leave it unset.

log( "Showing interstitial ad for placement \"" + placementId + "\"..." );

UnityAds.show( activity, placementId, createAdShowOptions(), new IUnityAdsShowListener()
loadedInterstitialAd.show( activity, new ShowConfiguration.Builder().build(), new InterstitialShowListener()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for the 3 types, but we should null check I believe to avoid NPE in case user didn't call load first

.withMediationInfo( createMediationInfo() )
.build();

UnityAds.initialize( config, new InitializationListener()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most listeners could be simply lambdas (init, load, etc.)

Comment thread UnityAds/CHANGELOG.md Outdated
# Changelog

## 4.18.1.1
* Migrated to Unity Ads SDK 4.x new experimental API (`InitializationConfiguration`, `InterstitialAd`, `RewardedAd`, `BannerAd`, `LoadConfiguration`, `ShowConfiguration`).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not experimental at this point :-)

@AnwarissaAsbah AnwarissaAsbah merged commit e038010 into feat/unity-dynamic-banner-size Jun 29, 2026
AnwarissaAsbah added a commit that referenced this pull request Jun 29, 2026
* dynamic size

* Update build.gradle

revent changes

* Update settings.gradle

revert changes

* bump version

* null handling

* Update UnityAdsMediationAdapter.java

* Delete .gradle/config.properties

* UnityAds Adapter: 4.19.0 api migration (#3)

* UnityAds Adapter: 4.18.0 api migration

* Update UnityAdsMediationAdapter.java

* Update UnityAdsMediationAdapter.java

* Update CHANGELOG.md

* Update UnityAdsMediationAdapter.java

* Update UnityAdsMediationAdapter.java

* update change log

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants