Menu

Initialization

Note:

  1. Please refer to the Privacy Compliance Guide to configure Privacy Settings for compliance operations.
  2. You need to call ATSDK#init() for Initialization after the user agrees to the privacy authorization. It is also recommended to call start() only in the main process and in the foreground.

1. API Description


1.1 ATSDK

API Description
void init(Context context, String TakuAppID, String TakuAppKey) Taku SDK Initialization method. The Taku App ID and Taku App Key need to be obtained after creating an app in the Taku dashboard. It is recommended to Initialize in Application's onCreate, and it is recommended to call only in the main process. How to get the App Key?
start() The startup entry of the Taku SDK. This API needs to be called after the ATSDK.init method. The startup operation will be executed on a child thread. For v6.2.95 and above, to improve the accuracy of Taku DAU statistics, it is strongly recommended to add this method call when using the domestic Taku SDK. It is recommended to call only in the main process and in the foreground.
Note: 1. This API is only effective for domestic Taku SDK. For overseas Taku SDK, there is no need to call this API; only ATSDK.init needs to be called. 2. Supported in v6.2.95 and above.
setNetworkLogDebug(boolean debug) Set whether to output Debug logs. It is recommended to enable it during the testing phase to facilitate verification of ad callback statuses. Please refer to Taku SDK Logs
getSDKVersionName Get the Taku SDK version.
integrationChecking(Context context) Check the integration status of the ad platforms. Please refer to Verifying Ad Platform SDK Integration.
Note: This API cannot be used on builds submitted for review.
isCnSDK() Determine whether the current SDK being used is the China-region version.
testModeDeviceInfo(Context context, DeviceInfoCallback deviceInfoCallback) Print the device info of the current device (IMEI, OAID, GAID, AndroidID, etc.).

2. Sample Code


2.1 Initialize Taku SDK

Copy
// It is strongly recommended to call in the app's corresponding Application#onCreate() method to avoid exceptions where content is null.
// ATSDK.init only performs Initialization and does not obtain personal information. To display ads, you need to call the ATSDK.start method afterwards.
ATSDK.init(getApplicationContext(), TakuAppID, TakuAppKey);// Initialize SDK
ATSDK.start();    // v6.2.95+, for domestic SDK, call start to launch the SDK.
  • After calling the init method to Initialize the SDK, ad loading can be performed immediately.
  • Calling the init method multiple times will not cause the SDK to re-Initialize. Only the first call to the init method is effective.
  • The init method only Initializes the Taku SDK by default and will not Initialize the ad platform SDKs.
  • Privacy configuration can be performed before Initialization. For privacy configuration related instructions, refer to Domestic Privacy Configuration.
  • If your app uses multiple processes, only perform SDK Initialization in the main process.

Appendix

Taku Privacy Policy: https://help.takuad.com/docs/1Mn1B7

Privacy Compliance Guide: https://help.takuad.com/docs/ByIf1V

Previous
SDK access configuration
Next
Ad Format
Last modified: 2026-07-03Powered by