AppLovinMAX class
Represents the AppLovin SDK.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- targetingData → TargetingData
-
The targeting data object for you to provide user or app data that will improve how we target ads.
final
Static Methods
-
createBanner(
String adUnitId, AdViewPosition position) → void -
Creates a banner using your
adUnitId
at the specified AdViewPosition position. -
createMRec(
String adUnitId, AdViewPosition position) → void -
Creates an MREC using your
adUnitId
at the specified AdViewPosition position. -
destroyBanner(
String adUnitId) → void - Cleans up system resources allocated for the banner.
-
destroyMRec(
String adUnitId) → void - Cleans up system resources allocated for the MREC.
-
getAdaptiveBannerHeightForWidth(
double width) → Future< double?> - Gets the adaptive banner size for the provided width.
-
getConsentDialogState(
) → Future< int?> - Returns an integer that encodes the state of the consent dialog.
-
hasSupportedCmp(
) → Future< bool?> - Returns true if a supported CMP SDK is detected.
-
hasUserConsent(
) → Future< bool?> - Checks if the user has set a consent flag.
-
hideBanner(
String adUnitId) → void -
Hides the banner with the specified
adUnitId
. -
hideMRec(
String adUnitId) → void -
Hides the MREC with the specified
adUnitId
. -
initialize(
String sdkKey) → Future< MaxConfiguration?> - Initializes the SDK.
-
isAgeRestrictedUser(
) → Future< bool?> - Checks if the user is age-restricted.
-
isAppOpenAdReady(
String adUnitId) → Future< bool?> -
Check if the ad is ready to be shown with the specified
adUnitId
. -
isDoNotSell(
) → Future< bool?> - Returns true if the user has opted out of interest-based advertising.
-
isInitialized(
) → Future< bool?> - Checks if the SDK has fully been initialized without errors.
-
isInterstitialReady(
String adUnitId) → Future< bool?> -
Check if the ad is ready to be shown with the specified
adUnitId
. -
isRewardedAdReady(
String adUnitId) → Future< bool?> -
Check if the ad is ready to be shown with the specified
adUnitId
. -
loadAppOpenAd(
String adUnitId) → void -
Loads an app open ad using your
adUnitId
. -
loadBanner(
String adUnitId) → void - Load a new banner ad. NOTE: The createBanner method loads the first banner ad and initiates an automated banner refresh process. You only need to call this method if you pause banner refresh.
-
loadInterstitial(
String adUnitId) → void -
Loads an interstitial ad using your
adUnitId
. -
loadMRec(
String adUnitId) → void - Load a new MREC ad. NOTE: The createMRec method loads the first MREC ad and initiates an automated MREC refresh process. You only need to call this method if you pause MREC refresh.
-
loadRewardedAd(
String adUnitId) → void -
Loads a rewarded ad using your
adUnitId
. -
setAppOpenAdExtraParameter(
String adUnitId, String key, String value) → void -
Sets an extra parameter to the rewarded ad with the specified
adUnitId
. -
setAppOpenAdListener(
AppOpenAdListener listener) → void - Sets a AppOpenAdListener listener with which you can receive notifications about ad events.
-
setBannerBackgroundColor(
String adUnitId, String hexColorCodeString) → void -
Sets a background color for the banner with the specified
adUnitId
. -
setBannerExtraParameter(
String adUnitId, String key, String value) → void -
Sets an extra parameter to the banner with the specified
adUnitId
. -
setBannerListener(
AdViewAdListener listener) → void - Sets an AdViewAdListener listener with which you can receive notifications about ad events.
-
setBannerPlacement(
String adUnitId, String placement) → void -
Sets an ad placement name for the banner with the specified
adUnitId
. -
setConsentFlowDebugUserGeography(
ConsentFlowUserGeography userGeography) → void -
Set debug user geography. You may use this to test CMP flow by setting
this to
ConsentFlowUserGeography.GDPR
. -
setCreativeDebuggerEnabled(
bool enabled) → void - Whether the creative debugger will be displayed on fullscreen ads after flipping the device screen down twice. Defaults to true.
-
setDoNotSell(
bool isDoNotSell) → void - Sets true to indicate that the user has opted out of interest-based advertising.
-
setExtraParameter(
String key, String? value) → void - Sets an extra parameter to pass to the AppLovin server.
-
setHasUserConsent(
bool hasUserConsent) → void - Sets whether or not the user has provided consent for interest-based advertising.
-
setInitializationAdUnitIds(
List adUnitIds) → void - Sets a list of the ad units for the SDK to initialize only those networks. Should be set before initializing the SDK.
-
setInterstitialExtraParameter(
String adUnitId, String key, String value) → void -
Sets an extra parameter to the interstitial ad with the specified
adUnitId
. -
setInterstitialListener(
InterstitialListener listener) → void - Sets an InterstitialListener listener with which you can receive notifications about ad events.
-
setIsAgeRestrictedUser(
bool isAgeRestrictedUser) → void - Marks the user as age-restricted.
-
setLocationCollectionEnabled(
bool enabled) → void - Whether or not the AppLovin SDK will collect the device location. Defaults to true.
-
setMRecExtraParameter(
String adUnitId, String key, String value) → void -
Sets an extra parameter to the MREC with the specified
adUnitId
. -
setMRecListener(
AdViewAdListener listener) → void - Sets an AdViewAdListener listener with which you can receive notifications about ad events.
-
setMRecPlacement(
String adUnitId, String placement) → void -
Sets an ad placement name for the MREC with the specified
adUnitId
. -
setMuted(
bool muted) → void - Sets whether to begin video ads in a muted state or not.
-
setPrivacyPolicyUrl(
String urlString) → void - The URL of your company’s privacy policy, as a string. This is required in order to enable the Terms Flow.
-
setRewardedAdExtraParameter(
String adUnitId, String key, String value) → void -
Sets an extra parameter to the rewarded ad with the specified
adUnitId
. -
setRewardedAdListener(
RewardedAdListener listener) → void - Sets a RewardedAdListener listener with which you can receive notifications about ad events.
-
setTermsAndPrivacyPolicyFlowEnabled(
bool enabled) → void - Enables the MAX Terms and Privacy Policy Flow.
-
setTermsOfServiceUrl(
String urlString) → void - The URL of your company’s terms of service, as a string. This is optional; you can enable the Terms Flow with or without it.
-
setTestDeviceAdvertisingIds(
List advertisingIdentifiers) → void - Enables devices to receive test ads by passing in the advertising identifier (IDFA or IDFV) of each test device. Refer to AppLovin logs for the IDFA or IDFV of your current device.
-
setUserId(
String userId) → void - Sets the internal user ID for the current user to a string value of your choice.
-
setVerboseLogging(
bool enabled) → void - Enables verbose logging for the SDK.
-
showAppOpenAd(
String adUnitId, {dynamic placement, dynamic customData}) → void -
Shows the app open ad with the specified
adUnitId
. -
showBanner(
String adUnitId) → void -
Shows the banner with the specified
adUnitId
. -
showCmpForExistingUser(
) → Future< MaxCMPError?> - Shows the CMP flow to an existing user. Note that this resets the user’s existing consent information.
-
showInterstitial(
String adUnitId, {dynamic placement, dynamic customData}) → void -
Shows the interstitial ad with the specified
adUnitId
. -
showMediationDebugger(
) → void - Displays the Mediation Debugger.
-
showMRec(
String adUnitId) → void -
Shows the MREC with the specified
adUnitId
. -
showRewardedAd(
String adUnitId, {dynamic placement, dynamic customData}) → void -
Shows the rewarded ad with the specified
adUnitId
. -
startBannerAutoRefresh(
String adUnitId) → void -
Starts or resumes auto-refreshing of the banner for the specified
adUnitId
. -
startMRecAutoRefresh(
String adUnitId) → void -
Starts or resumes auto-refreshing of the MREC for the specified
adUnitId
. -
stopBannerAutoRefresh(
String adUnitId) → void -
Pauses auto-refreshing of the banner for the specified
adUnitId
. -
stopMRecAutoRefresh(
String adUnitId) → void -
Pauses auto-refreshing of the MREC for the specified
adUnitId
. -
updateBannerPosition(
String adUnitId, AdViewPosition position) → void -
Updates the banner position with the specified
adUnitId
. -
updateMRecPosition(
String adUnitId, AdViewPosition position) → void -
Updates the MREC position with the specified
adUnitId
.