Pangle: A global platform dedicated to developer growth.|Integration Docs
Knowledge Center

Initialize Pangle SDK

Initialize Pangle SDK asynchronously is supported since the v3.5.0.0 SDK, please call TTAdSdk.init(final Context var0, final TTAdConfig var1, final TTAdSdk.InitCallback var2) to initializes the SDK before you send any ad requests. Init only need to be called once per app’s lifecycle, we strongly recommend to do this on app launch.

TTAdSdk.InitCallback will be informed about the result of the initialize.

If you use TextureView for video ads and you are using SDK below v4.2.5.2, please set useTextureView(true) in the Builder and add add WAKE_LOCK permission in the manifest. WAKE_LOCK permission is no longer required in version and above.

【IMPORTANT】If you need to call the method getBiddingToken, we strongly recommend that you call it in the background thread, and call it in the success()callback after the SDK is initialized successfully

You also could check the initialization status with the method TTAdSdk.isInitSuccess()

Before v3.5.0.0, please use synchronous method TTAdSdk.init(Context var0, TTAdConfig var1) to initialize Pangle SDK.

Warning: Ads may be preloaded by the Pangle Ads SDK or mediation partner SDKs after initialize. If you need to obtain consent from users under age 13, please ensure you do so before initializing the Pangle Ads SDK.

If you want to change the value of COPPA after initializing Pangle SDK, you can call following method, as shown below: