Moloco SDK Android
Moloco SDK allows you to load and render any ad (VAST, MRAID, Static HTML)
Release Notes
3.9.0 (April 2025)
Fix MRAID audio controls
3.8.0 (March 2025)
Breaking change to the error code for ad creation. Now returns UNABLE_TO_CREATE_AD instead of INVALID_AD_UNIT_ID
Improvements to Video Player, where the video may have gotten stretched
NativeAds no longer crash when used inside a Dialog
3.7.2 (March 2025)
Critical bug fix for Android 5.x
3.7.1 (February 2025)
Performance improvements
3.7.0 (February 2025)
Migrated banner implementation from Jetpack Compose to standard Android Views, enhancing compatibility with traditional Activity-based screens. This change ensures better integration when the parent activity is a standard Activity rather than a ComponentActivity.
Performance improvements for fullscreen ads
Verified tablet support
Fixed ClassCastException in MolocoPrivacy
Fixed MRAID rewarded video crash
3.6.1 (January 2025)
Critical bug fix
3.6.0 (January 2025)
Native Ads and other UI improvements
Bug fixes, including crash resolutions
SDK size reduction
How to use
Make sure to initialize SDK first. To do so, you need to provide a com.moloco.sdk.publisher.MolocoInitParams which includes:
Context - Android Context
appKey - Identifier of the publisher app registered with Moloco
MediationInfo - To perform the appropriate initialization for the mediation partner
After a successful initialization, now you can create an ad instance of your choice:
Guidelines and samples for created ad instances in the previous step:
Retrieving Bid Token from the SDK:
The API can be called before SDK initialization but needs to be called before each bid request
call Moloco.getBidToken() before each bid request.
The API is safe to be called from any thread and preferably should be called from the non-UI thread
The bid token and error (optional) will be returned in the callback of MolocoBidTokenListener
The bid token can be used to make a bid request to the Moloco server. A few considerations when passing bid token:
bidToken is never null
bidToken might be an empty string when Moloco in non-bid-token mode; or when error returned in the callback is not null
error, when present, means: bidToken is an invalid one. Use error data for tracking/logging purposes
Important: bidToken should still be passed to the bid request regardless of error presence.
Setting the Privacy information in the SDK
Official adapters will need to update Moloco SDK with privacy information.
In order to use Privacy API, Moloco SDK must be initialized
Call MolocoPrivacy.setPrivacy() to set the privacy information. The API can be called from any thread
MolocoPrivacy.setPrivacy(
MolocoPrivacy.PrivacySettings(
isUserConsent = true,
isAgeRestrictedUser = false,
isDoNotSell = false
)
)