Table of Contents | ||
---|---|---|
|
Prerequisites
Do Flutter Get Started until finishing step 4
Step summary
Add the Initialization code.
Follow our ad format guides for their implementation.
Test everything is working
Change everything to production code
Your app is now prepared for monetization with us.
We only mention how to create wrappers and not triggers because the way a trigger is fetch for its use is highly dependant on your specific app code.
Wrappers and Triggers/Events are used for different formats, each ad format page tells you what you need to use (wrapper or trigger) to display it.
Initialize the SDK
Use the R89SDK.initialize(...)
method to initialize the SDK.
Code Block | ||
---|---|---|
| ||
R89SDK.setLogLevel(LogLevel.debug); //This is for testing purposes, remove it on prod
R89SDK.setDebug(); //This is for testing purposes, remove it on prod
R89SDK.initialize(
publisherId: "TestRefinery89ID", /* This is for testing purposes, change it on prod */
appId: "TestDemoApp", /* This is for testing purposes, change it on prod */
singleTag: true); |
Info |
---|
Your |
Note |
---|
This |
Add navigation observer.
Add R89SDK.routeObserver
to your navigatorObservers
list
Code Block | ||
---|---|---|
| ||
@override
Widget build(BuildContext context) {
return MaterialApp(
navigatorObservers: [
R89SDK.routeObserver,
],
// ...
);
} |
Follow our ad formats guides
Child pages (Children Display) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Go into production
In the dart code remove the method
R89SDK.setDebug()
.In the Android module change the
com.google.android.gms.ads.APPLICATION_ID
in the manifest for the production one.In the iOS module change the
GADApplicationIdentifier
in theinfo.plist
for the production one.In the dart code change the
appId
andpublisherId
in the initialization method for the production ones.it’s also recommended to remove
R89SDK.setLogLevel(LogLevels.DEBUG)
but not required.
How does it work?
We fetch all ad unit configurations from our Database and you simply need to place the ad units using the R89 Ad widgets and the r89ConfigurationIDs
we provide you. Incorporate them into the desired pages in your app.
Check Flutter - Ad Formats to see how each format is implemented.