Flutter - Monetarisierungs-SDK-Dokumentation

⌘K
  1. Flutter - App mit SD monetarisieren...
  2. Benutzerhandbuch
  3. Anzeigenformate
  4. Banner

Banner

Rectangular advertisements that remain visible on the screen during user interaction with the application, and have the ability to refresh automatically after a specified duration.

Zeige die Anzeige

In the example we are using a Test Id.

If you are not testing the app, change it for the proper ID that you got from us.

@override
  Widget build(BuildContext context) => Scaffold(
    appBar: ...,
    body: Column(children: [
      ...
      R89Banner(
          configurationId: ConfigBuilder.bannerTestR89ConfigId),
      ...
    ],),
  );

Lebenszyklusereignisse

To receive the lifecycle events, provide BannerEventListener zu R89Banner über LebenszyklusRückrufe Parameter. Einzelheiten zu BannerEventListener kann in der Referenz.

@override
  Widget build(BuildContext context) => Scaffold(
    appBar: ...,
    body: Column(children: [
      ...
      R89Banner(
              configurationId: ConfigBuilder.bannerTestR89ConfigId,
              lifecycleCallbacks: BannerEventListener.callbacks(
                  onLoadedCallback: () {},
                  onImpressionCallback: () {},
                  onLayoutChangeCallback: (width, height) {},
                  onClickCallback: () {},
                  onOpenCallback: () {},
                  onCloseCallback: () {},
                  onFailedToLoadCallback: (error) {},)
            ),
      ...
    ],),
  );

Wie können wir helfen?