Initialization

Initialize AATKit

Before reloading and showing ads, you need to initialize AATKit. This should be done as soon as possible, ideally when starting the app. In your dart code, create the AATKitBinding instance, like:

static final AATKitBinding _aatKitBinding = AATKitBinding();

This object will bridge dart code with native Android/iOS platforms. To initialize AATKit, just call:

_aatKitBinding.initAATKit();

AATKitBinding dart class has its native equivalents. For Android it is flutter-binding/android/app/src/main/kotlin/com/addapttr/flutter_binding/AATKitBinding.kt file, for iOS it is flutter-binding/ios/Runner/AATKitBinding.swift file. Modify these files to adjust AATKit configuration. Just set desired settings using configuration object in the initAATKit methods:swi

Android
    // Adjust AATKit configuration to your needs
    private fun initAATKit() {
        ...

        configuration.setTestModeAccountId(74)
        AATKit.init(configuration)

        ...
    }
iOS
    // Adjust AATKit configuration to your needs
    private func initAATKit() {
        ...
        configuration.testModeAccountId = 74
        AATSDK.initAATKit(with: configuration)
        ...
    }

Last updated