Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Prerequisites

Step

...

summary

  1. Add the Initialization code.

  2. Add the Tagged Wrappers, Tagged Buttons

  3. Note the Transitions Events

  4. Add the testing Single Data

  5. Test everything is working

  6. Change everything to production code

  7. Your app is now prepared for monetization with us.

...

Code Block
languagedart
void addTestingSingleTagData() {
    
    // Define the initial/home route name as the main screen, 
    // in the example it is MainPage
    R89SDK.singleTagConfiguration.initialRouteName = '/'
    // Configure the main screen with ad placements
    R89SDK.singleTagConfiguration.addAdScreenConfig(
        adScreenConfig: AdScreenConfig(screenName: '/')
          // Add a banner inside the wrapper with the tag 'main_page_bottom_ad_container'
          ..addBanner(
                tag: 'main_page_bottom_ad_container',
                getAllWithTag: false, // Only place ad in the first R89Tag wrapper in the screen, 
                                      // in case there are multiple R89Tags with the same tag: available on the same screen.
                wrapperRelativePositionAfter: true, // Place the ad below the child of R89Tag(child:...)
          )
          // Triggers an interstitial when transitioning from "MainPage" ("/") to "NewsPostDetailPage"
          ..addInterstitial(eventToTrack: 'NewsPostDetailPage')
          // Triggers an interstitial when a child of R89Tag(tag:'play_video_trailer_tag',child:...) is pressed
          ..addInterstitial(eventToTrackButton: 'play_video_trailer_tag')
    );
}

...

  • In the dart code remove the methods R89SDK.setDebug() and addTestingSingleTagData().

  • In the Android module change the App com.google.android.gms.ads.APPLICATION_ID in the manifest for the production one.

  • In the iOS module change the GADApplicationIdentifier in the info.plist for the production one.

  • In the dart code change the appId and publisherId in the initialization method for the production ones.

  • it’s also recommended to remove R89SDK.setLogLevel(LogLevels.DEBUG) but not required.

...