इनलाइन अडैप्टिव बैनर
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
प्लैटफ़ॉर्म चुनें:
Android
iOS
Flutter
अडैप्टिव बैनर की मदद से, विज्ञापन की चौड़ाई तय की जा सकती है. इससे विज्ञापन का सबसे सही साइज़ तय करने में मदद मिलती है. अडैप्टिव बैनर, हर डिवाइस के लिए विज्ञापन के साइज़ को ऑप्टिमाइज़ करके, परफ़ॉर्मेंस को भी बेहतर बनाते हैं. इस तरीके से, परफ़ॉर्मेंस को बेहतर बनाने के अवसर मिलते हैं.
ऐंकर किए गए अडैप्टिव बैनर की तुलना में, इनलाइन अडैप्टिव बैनर बड़े और लंबे होते हैं. इनकी कोई तय लंबाई नहीं होती, बल्कि ये डिवाइस की स्क्रीन के हिसाब से खुद को इस तरह फ़िट कर लेते हैं जिससे कि पूरी स्क्रीन पर दिख सकें. इनलाइन अडैप्टिव बैनर की लंबाई कम या ज़्यादा की जा सकती है. ये पूरी स्क्रीन पर दिख सकते हैं या आपकी तय की गई ज़्यादा से ज़्यादा लंबाई में दिख सकते हैं.
इनलाइन अडैप्टिव बैनर को स्क्रोल किए जा सकने वाले कॉन्टेंट में रखा जाता है. उदाहरण के लिए:

शुरू करने से पहले
जारी रखने से पहले, पक्का करें कि आपके पास ये चीज़ें हों:
अडैप्टिव बैनर लागू करना
ऐंकर किए गए अडैप्टिव बैनर के उलट, इनलाइन अडैप्टर बैनर, इनलाइन अडैप्टिव बैनर के साइज़ का इस्तेमाल करके लोड होते हैं. इनलाइन अडैप्टिव विज्ञापन का साइज़ बनाने के लिए, यह तरीका अपनाएं:
इस्तेमाल किए जा रहे डिवाइस की चौड़ाई पाएं या अगर आपको स्क्रीन की पूरी चौड़ाई का इस्तेमाल नहीं करना है, तो अपनी चौड़ाई सेट करें.
विज्ञापन के साइज़ वाली क्लास पर सही स्टैटिक तरीकों का इस्तेमाल करें. जैसे,
GADCurrentOrientationInlineBannerAdSizeWithWidth(CGFloat width)
चुने गए ओरिएंटेशन के लिए, इनलाइन अडैप्टिव विज्ञापन के साइज़ वाला ऑब्जेक्ट पाने के लिए.
Swift
// Step 1: Create an inline adaptive banner ad size. This size is used to
// request your adaptive banner. You can pass in the width of the device, or
// set your own width. This example sets a static width.
let adSize = GADCurrentOrientationInlineAdaptiveBannerAdSizeWithWidth(320)
// Step 2: Create banner with the inline size and set ad unit ID.
let bannerView = GADBannerView(adSize: adSize)
bannerView.adUnitID = "AD_UNIT_ID"
bannerView.rootViewController = self
// Step 3: Load an ad.
let request = Request()
bannerView.load(request)
// TODO: Insert banner view in table view or scroll view, etc.
Objective-C
// Step 1: Create an inline adaptive banner ad size. This size is used to
// request your adaptive banner. You can pass in the width of the device, or set
// your own width. This example sets a static width.
GADAdSize adSize = GADCurrentOrientationInlineAdaptiveBannerAdSizeWithWidth(320);
// Step 2: Create banner with the inline size and set ad unit ID.
GADBannerView bannerView = [[GADBannerView alloc] initWithAdSize:adSize];
bannerView.adUnitID = @"AD_UNIT_ID";
bannerView.rootViewController = self;
// Step 3: Load an ad.
GADRequest *request = [GADRequest request];
[bannerView loadRequest:request];
// TODO: Insert banner view in table view or scroll view, etc.
अपने ऐप्लिकेशन में अडैप्टिव बैनर लागू करते समय, इन बातों का ध्यान रखें:
- इनलाइन अडैप्टिव बैनर के साइज़, उपलब्ध पूरी चौड़ाई का इस्तेमाल करने पर सबसे अच्छी तरह काम करते हैं. ज़्यादातर मामलों में, यह साइज़ इस्तेमाल किए जा रहे डिवाइस की स्क्रीन की पूरी चौड़ाई या बैनर के पैरंट कॉन्टेंट की पूरी चौड़ाई होती है. आपको विज्ञापन में शामिल किए जाने वाले व्यू की चौड़ाई, डिवाइस की चौड़ाई, पैरंट कॉन्टेंट की चौड़ाई, और लागू होने वाले सुरक्षित क्षेत्रों के बारे में पता होना चाहिए.
इनलाइन अडैप्टिव बैनर के साइज़ को ओरिएंट करना
किसी खास ओरिएंटेशन के लिए, इनलाइन अडैप्टिव बैनर विज्ञापन को प्रीलोड करने के लिए, इन तरीकों का इस्तेमाल करें:
अगर आपका ऐप्लिकेशन पोर्ट्रेट और लैंडस्केप, दोनों व्यू के साथ काम करता है और आपको मौजूदा ओरिएंटेशन में अडैप्टिव बैनर विज्ञापन को प्रीलोड करना है, तो GADCurrentOrientationInlineAdaptiveBannerAdSizeWithWidth(CGFloat width)
का इस्तेमाल करें. यह तरीका, मौजूदा ओरिएंटेशन में विज्ञापन लोड करता है.
इनलाइन अडैप्टिव बैनर की ऊंचाई सीमित करना
डिफ़ॉल्ट रूप से, maxHeight
वैल्यू के बिना इंस्टैंटिएट किए गए इनलाइन अडैप्टिव बैनर में, maxHeight
की वैल्यू डिवाइस की ऊंचाई के बराबर होती है. इनलाइन अडैप्टिव बैनर की ऊंचाई को सीमित करने के लिए, GADInlineAdaptiveBannerAdSizeWithWidthAndMaxHeight(CGFloat width, CGFloat maxHeight)
तरीके का इस्तेमाल करें.
अन्य संसाधन
GitHub पर मौजूद उदाहरण
इनलाइन अडैप्टिव बैनर को काम करते हुए देखने के लिए, सैंपल ऐप्लिकेशन डाउनलोड करें.
Swift
Objective-C
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-09-02 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-09-02 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eInline adaptive banners are larger and taller than anchored adaptive banners, using variable heights to maximize screen space within scrolling content.\u003c/p\u003e\n"],["\u003cp\u003eTo implement inline adaptive banners, you'll need the Google Mobile Ads SDK 8.10.0 or higher and to have completed the Banner Ads getting started guide.\u003c/p\u003e\n"],["\u003cp\u003eThese banners are created using an inline adaptive banner size, determined by the device width or a custom width, and can have a maximum height set if desired.\u003c/p\u003e\n"],["\u003cp\u003eWhen using inline adaptive banners, ensure you're using the full available width and are aware of device, parent content, and safe area dimensions for optimal placement.\u003c/p\u003e\n"],["\u003cp\u003eInline adaptive banner ads can be preloaded for specific orientations or the current orientation, and their height can be limited using designated methods.\u003c/p\u003e\n"]]],["Inline adaptive banners, which are larger and use variable heights, optimize ad size for each device and are placed in scrolling content. Implementation involves determining the ad's width and using methods like `GADCurrentOrientationInlineBannerAdSizeWithWidth` or `GADInlineAdaptiveBannerAdSizeWithWidthAndMaxHeight`. To use you must first create a size object, then the banner with the size object and ad id. Lastly, load the ad. These banners can be preloaded for specific or current orientations and may have a max height.\n"],null,["Select platform: [Android](/admob/android/banner/inline-adaptive \"View this page for the Android platform docs.\") [iOS](/admob/ios/banner/inline-adaptive \"View this page for the iOS platform docs.\") [Flutter](/admob/flutter/banner/inline-adaptive \"View this page for the Flutter platform docs.\")\n\n\u003cbr /\u003e\n\nAdaptive banners let you specify the width of an ad to determine the optimal\nad size. Adaptive banners also maximize performance by optimizing the ad size\nfor each device. This approach results in opportunities for\nimproved performance.\n\nCompared to anchored adaptive banners, inline adaptive banners are larger,\ntaller, and use variable instead of fixed heights. Inline adaptive banners are\nof variable height, and might encompass the entire screen or a maximum height\nthat you specify.\n\nYou place inline adaptive banners in scrolling content, for example:\n\nBefore you begin\n\nBefore continuing, make sure you have the following:\n\n- Completed the getting started guide, [Banner Ads](/admob/ios/banner).\n\nImplement adaptive banners\n\nUnlike anchored adaptive banners, inline adapter banners load using an inline\nadaptive banner size. To create an inline adaptive ad size, complete the\nfollowing:\n\n1. Get the width of the device in use, or set your own width if you don't want\n to use the full width of the screen.\n\n2. Use the appropriate static methods on the ad size class, such as\n\n `GADCurrentOrientationInlineBannerAdSizeWithWidth(CGFloat width)`\n\n to get an inline adaptive ad size object for the chosen orientation.\n\n \u003cbr /\u003e\n\n Swift \n\n // Step 1: Create an inline adaptive banner ad size. This size is used to\n // request your adaptive banner. You can pass in the width of the device, or\n // set your own width. This example sets a static width.\n let adSize = GADCurrentOrientationInlineAdaptiveBannerAdSizeWithWidth(320)\n // Step 2: Create banner with the inline size and set ad unit ID.\n let bannerView = GADBannerView(adSize: adSize)\n bannerView.adUnitID = \"\u003cvar class=\"readonly\" translate=\"no\"\u003eAD_UNIT_ID\u003c/var\u003e\"\n bannerView.rootViewController = self\n\n // Step 3: Load an ad.\n let request = Request()\n bannerView.load(request)\n // TODO: Insert banner view in table view or scroll view, etc.\n\n Objective-C \n\n // Step 1: Create an inline adaptive banner ad size. This size is used to\n // request your adaptive banner. You can pass in the width of the device, or set\n // your own width. This example sets a static width.\n GADAdSize adSize = GADCurrentOrientationInlineAdaptiveBannerAdSizeWithWidth(320);\n // Step 2: Create banner with the inline size and set ad unit ID.\n GADBannerView bannerView = [[GADBannerView alloc] initWithAdSize:adSize];\n bannerView.adUnitID = @\"\u003cvar class=\"readonly\" translate=\"no\"\u003eAD_UNIT_ID\u003c/var\u003e\";\n bannerView.rootViewController = self;\n\n // Step 3: Load an ad.\n GADRequest *request = [GADRequest request];\n [bannerView loadRequest:request];\n // TODO: Insert banner view in table view or scroll view, etc.\n\n When implementing adaptive banners in your app, note these points:\n - The inline adaptive banner sizes work best when using the full available width. In most cases, this size is the full width of the device screen in use, or the full width of the banner's parent content. You must know the width of the view to place in the ad, the device width, the parent content width, and applicable safe areas.\n\n Orient inline adaptive banner size\n\n To preload an inline adaptive banner ad for a specific orientation, use the\n following methods:\n - [`GADPortraitInlineAdaptiveBannerAdSizeWithWidth(CGFloat width)`](/admob/ios/api/reference/Functions#gadportraitinlineadaptivebanneradsizewithwidth)\n\n - [`GADLandscapeInlineAdaptiveBannerAdSizeWithWidth(CGFloat width)`](/admob/ios/api/reference/Functions#gadlandscapeinlineadaptivebanneradsizewithwidth)\n\n If your app supports both portrait and landscape views, and you want to preload\n an adaptive banner ad in the current orientation, use\n\n [`GADCurrentOrientationInlineAdaptiveBannerAdSizeWithWidth(CGFloat width)`](/admob/ios/api/reference/Functions#gadcurrentorientationinlineadaptivebanneradsizewithwidth)\n\n This method loads an ad in the current orientation.\n\n Limit inline adaptive banner height\n\n By default, inline adaptive banners instantiated without a `maxHeight` value\n have a `maxHeight` equal to the device height. To limit the inline adaptive\n banner height, use the\n\n [`GADInlineAdaptiveBannerAdSizeWithWidthAndMaxHeight(CGFloat width, CGFloat maxHeight)`](/admob/ios/api/reference/Functions#gadinlineadaptivebanneradsizewithwidthandmaxheight)\n\n method.\n\n Additional resources\n\n Examples on GitHub\n\n Download the sample application to see inline adaptive banners in action.\n\n [Swift](//github.com/googleads/googleads-mobile-ios-examples/tree/main/Swift/advanced/InlineAdaptiveBannerExample)\n [Objective-C](//github.com/googleads/googleads-mobile-ios-examples/tree/main/Objective-C/advanced/InlineAdaptiveBannerExample)"]]