Initialization
Add, import, and configure AATKit
Last updated
Add, import, and configure AATKit
Last updated
Before loading ads, the app must initialize AATKit first. This only needs to be done once per app session, ideally at the app launch. You should call the AATKit.init(configuration)
as early as possible in order to ensure optimal ad performance. We advise doing it in your application's onCreate
method.
Call the initialization method with an instance which contains the necessary configuration data needed to initialize AATKit. Through , you can listen to AATKit callbacks such as obtaining mediation rules from the backend or unknown bundleID events.
It is required to pass the Activity lifecycle events to AATKit before starting to request ads from placements. You should override onResume()
and onPause()
methods in every Activity of your app.
Make sure to only pass lifecycle events of Activities belonging to your application. Using ActivityLifecycleCallbacks and passing lifecycle callbacks for also ad Activities (like the ones belonging to ad networks and used for presenting fullscreen ads) will cause issues.
Notify about activity resume
Notify about activity pause
AATKit will do dashboard reporting using your alternative bundle ID by default if you set it.
AATKit supports the following log levels:
Verbose
Verbose-level messages are intended to capture verbose, debug, info, warning and error messages. It’s convenient in an intensive development environment.
Debug
Debug-level messages are intended to capture debug, info, warning and error messages. It’s convenient in a normal development environment.
Info
Info-level messages are intended to capture info, warning and error messages. Info-level may be helpful but isn’t enough for troubleshooting.
Warn
Warn-level messages are intended to capture warning and error messages only.
Error
Error-level messages are intended to capture error messages only.
If you would want to obtain more debug logs from AATKit without recompiling the app, paste the following line:
into the terminal when your testing device is attached. You can also choose different log level, like DEBUG.
AATKit enables reconfiguring it at runtime. This might be needed for some cases like reacting to consent changes or geo-location settings changes. To reconfigure AATKit, use the reconfigure public API passing an instance of .
AATKit’s test mode provides ads even before your app has been set up at Gravite. This is convenient for testing your integration. Please use your testModeAccountId
to activate the test mode. Set the testModeAccountId
in your object. The testModeAccountId
will be sent to you via email after registering at .
Gravite recognises and identifies your app using its bundle ID. Should you need to use a different bundle ID for publishing or testing or other purposes, you can override the default bundle ID of your app by setting an "alternative bundle ID" for the object. But: before you can use the alternative bundle ID properly, please make sure that our has set up your app for the alternative bundle ID, as this is not a standard procedure.
If for any reason reporting should still be done using your app's real bundle ID, you can set the shouldReportUsingAlternativeBundleId
property of the object to false.
If you decided to use an alternative bundle ID, please get in touch with our .