Network Specific Request Parameters
Stay organized with collections
Save and categorize content based on your preferences.
Some network adapters support additional parameters which can be passed to the
adapter when the ad request is created. These are referred to as network extras.
The Google Mobile Ads plugin provides APIs on Android and iOS that let you pass
network extras to mediation adapters. To do so, you need to implement
MediationNetworkExtrasProvider
on Android and
FLTMediationNetworkExtrasProvider
on iOS, and then register your extras
provider implementation with the plugin. Afterwards the plugin will use it
to pass through network extras when it creates the ad request on Android or iOS.
Create an implementation of MediationNetworkExtrasProvider
:
class MyMediationNetworkExtrasProvider implements MediationNetworkExtrasProvider {
@Override
public Map<Class<? extends MediationExtrasReceiver>, Bundle> getMediationExtras(
String adUnitId, @Nullable String identifier) {
// This example passes extras to the AppLovin adapter.
// This method is called with the ad unit of the associated ad request, and
// an optional string parameter which comes from the dart ad request object.
Bundle appLovinBundle = new AppLovinExtras.Builder().setMuteAudio(true).build();
Map<Class<? extends MediationExtrasReceiver>, Bundle> extras = new HashMap<>();
extras.put(ApplovinAdapter.class, appLovinBundle);
// Note: You can pass extras to multiple adapters by adding more entries.
return extras;
}
}
Then register it with the GoogleMobileAdsPlugin
:
// Register a MediationNetworkExtrasProvider with the plugin.
public class MainActivity extends FlutterActivity {
@Override
public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {
super.configureFlutterEngine(flutterEngine);
// Register your MediationNetworkExtrasProvider to provide network extras to ad requests.
GoogleMobileAdsPlugin.registerMediationNetworkExtrasProvider(
flutterEngine, new MyMediationNetworkExtrasProvider());
}
}
You can see which extras are supported by different networks and how to
construct them in the Android reference for the specific
network.
Create an implementation of FLTMediationNetworkExtrasProvider
:
@implementation MyFLTMediationNetworkExtrasProvider
- (NSArray<id<GADAdNetworkExtras>> *_Nullable)getMediationExtras:(NSString *_Nonnull)adUnitId
mediationExtrasIdentifier:
(NSString *_Nullable)mediationExtrasIdentifier {
// This example passes extras to the AppLovin adapter.
// This method is called with the ad unit of the associated ad request, and
// an optional string parameter which comes from the dart ad request object.
GADMAdapterAppLovinExtras *appLovinExtras = [[GADMAdapterAppLovinExtras alloc] init];
appLovinExtras.muteAudio = NO;
// Note: You can pass extras to multiple adapters by adding more entries.
return @[ appLovinExtras ];
}
@end
And register it with FLTGoogleMobileAdsPlugin
:
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GeneratedPluginRegistrant registerWithRegistry:self];
// Register your network extras provider if you want to provide
// network extras to specific ad requests.
MyFLTMediationNetworkExtrasProvider *networkExtrasProvider =
[[MyFLTMediationNetworkExtrasProvider alloc] init];
[FLTGoogleMobileAdsPlugin registerMediationNetworkExtrasProvider:networkExtrasProvider
registry:self];
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
@end
You can see which extras are supported by different networks and how to
construct them in the iOS reference for the specific
network.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-04 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eNetwork extras allow sending additional parameters to network adapters during ad requests.\u003c/p\u003e\n"],["\u003cp\u003eTo pass network extras, implement \u003ccode\u003eMediationNetworkExtrasProvider\u003c/code\u003e (Android) or \u003ccode\u003eFLTMediationNetworkExtrasProvider\u003c/code\u003e (iOS).\u003c/p\u003e\n"],["\u003cp\u003eRegister your extras provider implementation with the Google Mobile Ads plugin.\u003c/p\u003e\n"],["\u003cp\u003eConsult the Android/iOS network references to find supported extras and their construction.\u003c/p\u003e\n"]]],[],null,["Some network adapters support additional parameters which can be passed to the\nadapter when the ad request is created. These are referred to as network extras.\n\nThe Google Mobile Ads plugin provides APIs on Android and iOS that let you pass\nnetwork extras to mediation adapters. To do so, you need to implement\n`MediationNetworkExtrasProvider` on Android and\n`FLTMediationNetworkExtrasProvider` on iOS, and then register your extras\nprovider implementation with the plugin. Afterwards the plugin will use it\nto pass through network extras when it creates the ad request on Android or iOS.\n\nRegister your MediationNetworkExtrasProvider on Android\n\nCreate an implementation of `MediationNetworkExtrasProvider`: \n\n class MyMediationNetworkExtrasProvider implements MediationNetworkExtrasProvider {\n\n @Override\n public Map\u003cClass\u003c? extends MediationExtrasReceiver\u003e, Bundle\u003e getMediationExtras(\n String adUnitId, @Nullable String identifier) {\n // This example passes extras to the AppLovin adapter.\n // This method is called with the ad unit of the associated ad request, and\n // an optional string parameter which comes from the dart ad request object.\n Bundle appLovinBundle = new AppLovinExtras.Builder().setMuteAudio(true).build();\n Map\u003cClass\u003c? extends MediationExtrasReceiver\u003e, Bundle\u003e extras = new HashMap\u003c\u003e();\n extras.put(ApplovinAdapter.class, appLovinBundle);\n // Note: You can pass extras to multiple adapters by adding more entries.\n return extras;\n }\n }\n\nThen register it with the `GoogleMobileAdsPlugin`: \n\n // Register a MediationNetworkExtrasProvider with the plugin.\n public class MainActivity extends FlutterActivity {\n\n @Override\n public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {\n super.configureFlutterEngine(flutterEngine);\n\n // Register your MediationNetworkExtrasProvider to provide network extras to ad requests.\n GoogleMobileAdsPlugin.registerMediationNetworkExtrasProvider(\n flutterEngine, new MyMediationNetworkExtrasProvider());\n }\n }\n\nYou can see which extras are supported by different networks and how to\nconstruct them in the Android reference for the specific\n[network](/ad-manager/mobile-ads-sdk/android/choose-networks#network_details).\n\nRegister your FLTMediationNetworkExtrasProvider on iOS\n\nCreate an implementation of `FLTMediationNetworkExtrasProvider`: \n\n @implementation MyFLTMediationNetworkExtrasProvider\n\n - (NSArray\u003cid\u003cGADAdNetworkExtras\u003e\u003e *_Nullable)getMediationExtras:(NSString *_Nonnull)adUnitId\n mediationExtrasIdentifier:\n (NSString *_Nullable)mediationExtrasIdentifier {\n // This example passes extras to the AppLovin adapter.\n // This method is called with the ad unit of the associated ad request, and\n // an optional string parameter which comes from the dart ad request object.\n GADMAdapterAppLovinExtras *appLovinExtras = [[GADMAdapterAppLovinExtras alloc] init];\n appLovinExtras.muteAudio = NO;\n // Note: You can pass extras to multiple adapters by adding more entries.\n\n return @[ appLovinExtras ];\n }\n @end\n\nAnd register it with `FLTGoogleMobileAdsPlugin`: \n\n\n @implementation AppDelegate\n\n - (BOOL)application:(UIApplication *)application\n didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {\n [GeneratedPluginRegistrant registerWithRegistry:self];\n\n // Register your network extras provider if you want to provide\n // network extras to specific ad requests.\n MyFLTMediationNetworkExtrasProvider *networkExtrasProvider =\n [[MyFLTMediationNetworkExtrasProvider alloc] init];\n [FLTGoogleMobileAdsPlugin registerMediationNetworkExtrasProvider:networkExtrasProvider\n registry:self];\n return [super application:application didFinishLaunchingWithOptions:launchOptions];\n }\n\n @end\n\nYou can see which extras are supported by different networks and how to\nconstruct them in the iOS reference for the specific\n[network](/ad-manager/mobile-ads-sdk/ios/choose-networks#network_details)."]]