androidx.browser:browser:1.9.0) for Chrome Custom Tabs to work correctly. If you integrate the SDK via Maven or Gradle, this dependency is added automatically as a transitive dependency and no action is needed. If you integrate by downloading the AAR directly, you must add androidx.browser:browser:1.9.0 to your app yourself, otherwise Chrome Custom Tabs will not work.setPreferredAdOptionsViewPosition(NativeAdOptionsViewPosition) API on NativeAd and NativeBannerAd to control AdChoices placement for regional compliance.com.google.android.gms:play-services-basement version (18.5.0), resolving dependency resolution for Gradle and Maven integrations.AdOptionsView is deprecated in favor of setPreferredAdOptionsViewPosition(...) on NativeAd and NativeBannerAd; manual AdOptionsView use remains supported.IllegalStateException in Android MediaPlayer/apex/com.android.art/lib64/libart.so (art::OatHeader::IsDebuggable() const+124) on Android 11.java.lang.IllegalStateException: Software rendering doesn't support hardware bitmaps.pc 00000000000830f0 /apex/com.android.runtime/lib64/bionic/libc.so (abort+160) crash.ClassNotFoundException when unmarshalling crash.Ad.buildLoadConfig() method call. The old API will still be supported in the near future, but will eventually be removed.IntersitialAd ad = new InterstitialAd(Context, String);
ad.loadAd(ad.buildLoadConfig() // LoadConfigBuilder
.withBid(String)
.withListener(AdListener)
.withCacheFlags(CacheFlags)
.build()); // builds LoadConfig
isChildDirected to MixedAudience. More information on Mixed Audiences and COPPA can be found here: /docs/audience-network/coppawithPreloadedIconView, allowing optional pre-caching of icon assets for native ads. A width and height must be specified.NativeAdBase
.buildLoadAdConfig() // NativeAdBase.LoadAdConfigBuilder
.withBidPayload(String)
.withCacheFlags(MediaCacheFlags)
.withPreloadedIconView(int w, int h)
.loadAd();
loadAd() request to an ad object if there is another request already loading or make a secondary showAd() request to an ad object if there is already an ad on screen.ImageView now interchangeable with MediaView for NativeBannerAdImageView. New methods (see below) have been added to allow this. Note that using MediaView is still supported.class NativeBannerAd {
/**
* Registers the given view as the container and the required ImageView as the Icon display
* for this NativeBannerAd to handle impressions and clicks.
* ImageView must be within the view passed as the container for this NativeBannerAd.
* Applies a click handler to the entire unit.
* @param view the View containing this NativeBannerAd for display
* @param iconView ImageView to display Icon for this NativeBannerAd
*
* @since 5.4
*/
public void registerViewForInteraction(View view, ImageView iconView);
/**
* Registers the given view as the container and the required ImageView as the Icon display
* for this NativeBannerAd to handle impressions and clicks.
* ImageView must be within the view passed as the container for this NativeBannerAd.
* Applies a click handler to the entire unit.
* @param view the View containing this NativeBannerAd for display
* @param iconView ImageView to display Icon for this NativeBannerAd
* @param clickableViews a list of all view elements that should handle taps on this unit
*
* @since 5.4
*/
public void registerViewForInteraction(
View view,
ImageView iconView,
@Nullable final List<View> clickableViews);
}
RecyclerView.NativeBannerAd.BidderTokenProvider.getBidderToken() can now be called often and the bidder token is precomputed at startup so, once the SDK initializes, obtaining the bidder token should be faster than in previous versions, avoiding latency issues.isInitialized) in AudienceNetworkAds that allows applications to test whether the SDK is initialized. This allows publishers to avoid double initialization.getAdsProcessName) in AudienceNetworkAds that allows applications to check whether the current process is an internal SDK process (same as isInAdsProcess that was introduced in 5.1). For publishers who want more control over their apps’ processes, this can be used to filter the process spawned by the ads SDK.NativeAdViewAttributes constructor now requires a Context object.AdOptionsView.MediaView (Native Ads).Fatal Exception: android.util.AndroidRuntimeException: android.content.pm.PackageManager$NameNotFoundException: com.google.android.webview Android bug.Error: java.lang.RuntimeException: java.lang.Throwable: A WebView method was called on thread 'JavaBridge'. All WebView methods must be called on the same thread. Exception.AdOptionsView for native ads which provides greater flexibility.Error: java.lang.RuntimeException: Unable to pause activity {com.your.app/com.facebook.ads.AudienceNetworkActivity}: java.lang.NullPointerException for Carousel Interstitials.java.lang.NoSuchMethodError: android.view.ViewTreeObserver.removeOnGlobalLayoutListener Exception.java.lang.IllegalStateException: The specified child already has a parent Exception.