GuidesAPI ReferenceRelease Notes
HomeLog InHome
Guides

BlazeGAMCustomNativeAdsDelegate - Android GAM Next Gen

BlazeGAMCustomNativeAdsDelegate lets your app handle custom native ad events from BlazeGAM, and optionally return targeting and request extras.

Override methods for logging, UI updates, or analytics. Same shape as the legacy BlazeGAMCustomNativeAdsDelegate. Only the package changes: com.blaze.gam.nextgen.custom_native.

onGAMCustomNativeAdError

fun onGAMCustomNativeAdError(errMsg: String) {}

Called when an ad operation fails. Also receives GMA Next-Gen initialization failures and timeouts, including an unset Ad Manager app ID. See Initialization.

Parameters:

  • errMsg: The error that occurred.

onGAMCustomNativeAdEvent

fun onGAMCustomNativeAdEvent(eventType: BlazeGoogleCustomNativeAdsHandler.EventType, adData: BlazeCustomNativeAdData) {}

Called when an ad-related event occurs.

Parameters:

customGAMTargetingProperties

suspend fun customGAMTargetingProperties(requestData: BlazeGamCustomNativeAdRequestInformation): Map<String, String> {
	return emptyMap()
}

Called before an ad request. Return custom targeting properties to attach to the request. See BlazeGamCustomNativeAdRequestInformation.

publisherProvidedId

suspend fun publisherProvidedId(requestData: BlazeGamCustomNativeAdRequestInformation): String? {
	return null
}

Publisher-provided ID for ad requests.

networkExtras

suspend fun networkExtras(requestData: BlazeGamCustomNativeAdRequestInformation): Bundle? {
	return null
}

Optional network-specific parameters for ad requests.


Did this page help you?