Loading...
Loading...
Migrates Android applications from the old, legacy Google Mobile Ads (GMA) SDK (com.google.android.gms:play-services-ads) to the new GMA Next-Gen SDK (com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk). Provides comprehensive mapping tables for imports, classes, and method signatures to help determine migration steps. Use when migrating an existing Android codebase from the old, legacy GMA SDK to GMA Next-Gen SDK.
npx skill4agent add google/skills google-mobile-ads-android-migrate-to-next-gencom.google.android.gms:play-services-adscom.google.android.libraries.ads.mobile.sdk:ads-mobile-sdklatestcurl -sS https://dl.google.com/dl/android/maven2/com/google/android/libraries/ads/mobile/sdk/ads-mobile-sdk/maven-metadata.xml | sed -n 's/.*<latest>\(.*\)<\/latest>.*/\1/p'minSdkcompileSdkplay-services-adsplay-services-ads-litegradle build -x testcom.google.android.gms.ads.APPLICATION_IDAndroidManifest.xmlapplicationIdInitializationConfig<meta-data>MobileAds.initialize()initialize()RequestConfigurationInitializationConfig.Builder.setRequestConfiguration()MobileAds.setRequestConfiguration()runOnUiThread {}Dispatchers.Main.launch {}com.google.android.gms.ads.mediation.Adaptercom.google.android.gms.adscom.google.android.libraries.ads.mobile.sdk.banner.AdViewadView.getBannerAd().isCollapsible()NativeAdLoaderNativeAdLoader.load(...)NativeAdRequest.Builder.setCustomFormatIds(customFormatIds: List<String>).disableImageDownloading().setMediaAspectRatio(mediaAspectRatio: NativeMediaAspectRatio).setAdChoicesPlacement(adChoicesPlacement: AdChoicesPlacement).setVideoOptions(videoOptions: VideoOptions)NativeAdmediaViewregisterNativeAd(nativeAd, mediaView)| Feature | Old SDK Import ( | GMA Next-Gen SDK Import ( |
|---|---|---|
| Core | ||
| Initialization | | |
| Initialization Listener | | |
| Ad Request | | Format specific (e.g. |
| Load Error | | |
| Full Screen Show Error | | |
| Request Configuration | | |
| Event Callbacks | | Format Specific (e.g., |
| Tools | ||
| Ad Inspector | | |
| Ad Inspector Listener | | |
| Formats | ||
| App Open | | |
| App Open Load | | |
| Banner | | |
| Banner Load | | |
| Banner Events | | |
| Interstitial | | |
| Interstitial Load | | |
| Ad Loader | | |
| Native | | |
| Native Custom Format Ad | | |
| Native Custom Click | | |
| Native Load | | |
| Native Ad View | | |
| Media Content | | |
| Media Aspect Ratio | | |
| Video Options | | |
| Video Controller | | |
| Rewarded | | |
| Rewarded Load | | |
| Rewarded Interstitial | | |
| Rewarded Interstitial Load | | |
| Paid Event Listener | | |
| Response Info | | |
| Adapter Response Info | | |
| Rewards | ||
| Reward Listener | | |
| Reward Item | | |
| Ad Value | | |
| Preloading | ||
| Configuration | | |
| Callback | | |
| Interstitial Preloader | | |
| Ad Manager | ||
| Ad Request | | |
| Ad View | | |
| App Event Listener | | |
| Feature | Old SDK Method Signature | GMA Next-Gen SDK Method Signature |
|---|---|---|
| Core | ||
| MobileAds Initialization | | |
| InitializationConfig Builder | N/A | |
| Ad Request Builder | | |
| Add Network Extras (AdMobAdapter) | | |
| Add Network Extras (Ad Source Adapter) | | |
| Custom Targeting | | |
| Formats | ||
| App Open | | |
| Banner | | |
| Interstitial | | |
| Rewarded | | |
| Rewarded Interstitial | | |
| Native Builder | | |
| Native Load | | |
| Native Ad Register | | |
| Set an App Event Listener (Banner) | | |
| Set an App Event Listener (Interstitial) | | |
| Callbacks | ||
| onAdOpened | | |
| onAdClosed | | |
| onFailedToShowFullScreenContent | | |
| onAdLoaded | AdLoadCallback: | Parameter name is always |
| onAdFailedToLoad | | |
| onCustomFormatAdLoaded | | |
| onPaidEventListener | | |
| onVideoMute | | |
| onAdPreloaded | | |
| Preloading | ||
| Configuration | | |
| Response Info | ||
| Get Response Info | | |
| Loaded Adapter Responses Info | | |
| Get Adapter Responses | | |
| Get Mediation Adapter Class | | |
| Adapter Response Info | ||
| Ad Source ID | | |
| Ad Source Name | | |
| Ad Source Instance ID | | |
| Ad Source Instance Name | | |