Menu

Initialization


Your App needs to formulate a "Privacy Policy", display the "Privacy Policy" when the user launches the App for the first time, and obtain the user's consent. For the "Privacy Policy" formulated by the App, please refer to "Privacy Compliance Guide"
Please ensure that the user agrees to the App's "Privacy Policy" before initializing Taku SDK


Note: In any Before loading an ad into an ad slot, you must first execute the Taku SDK's initialization method, otherwise the ad will not be loaded.

After opening Taku's SDK log, calling the SDK's initialization method will print out The current SDK version and the GAID (ADID) and Android ID of the current device facilitate developers to add test devices for testing in the Taku backend.


1. API description

1.1 ATSDK

APIParametersDescription
init(Context context, String TakuAppID, String TakuAppKey) The initialization method of TakuSDK, in which Taku AppID and Taku AppKey need to be obtained after the application is created in the Taku background.
This method is recommended to be initialized during Application onCreate
How to get App Key?
setNetworkLogDebug(boolean debug)Settings Is there Debug log output?
It is recommended to turn it on during the testing phase to facilitate verification of the ad callback status
Please refer to Taku SDK Log
getSDKVersionName-Get TakuSDK version
integrationChecking(Context context)Check the integration status of the advertising platform, please refer to Verify advertising platform SDK integration
Note: This API cannot be used on packages submitted for review
isCnSDK()-< /td>Determine whether the current SDK is in China
testModeDeviceInfo(Context context, DeviceInfoCallback deviceInfoCallback)Print the device information of the current device (IMEI, OAID, GAID, AndroidID, etc.)


2. Sample code

2.1 Initialize Taku SDK

ATSDK.init(getApplicationContext(), TakuAppID, TakuAppKey);//Initialize SDK
  • After calling the init method to initialize the SDK, the advertisement can be loaded immediately< /li>
  • When the init method is called multiple times, the SDK will not be initialized repeatedly. Only the init method called for the first time is valid
  • The init method only initializes the Taku SDK by default and will not initialize the SDK of the advertising platform
  • Privacy configuration can be performed before initialization For instructions on privacy configuration, please refer to Domestic Privacy Configuration, Overseas Privacy Configuration
  • If your app uses multiple processes, please perform SDK initialization operations only in the main process.


3. Advertising platform special configuration instructions

3.1 Tencent Advertising breakpoint installation or activation pop-up prompt

Note: Before calling the following code, the Tencent Advertising SDK must be initialized (it is recommended to initialize in Application), and the application ID used for initialization must be consistent with the application ID of the Tencent advertising source configured in the Taku background, otherwise Tencent will All ads for ads failed to load

GDTAdSdk.getGDTAdManger().showOpenOrInstallAppDialog(new GDTAppDialogClickListener() {
    @Override
    public void onButtonClick(int buttonType) {

    }
});

For details, please refer to: Continue installation or activate pop-up prompts

3.2 Mintegral supports WeChat mini program advertising (supported by v5.9.81 and above)

Map custommap = new HashMap();
custommap.put(ATAdConst.KEY.WECHAT_APPID, "Your Wechat AppId");
....
//CustomimMap with WeChat AppId must be set before initialization
ATSDK.initCustomMap(custommap);


Appendix

Taku Privacy Policy: https://newdocs.toponad.com/docs/1Mn1B7

Privacy Compliance Guide: https://newdocs.toponad.com/docs/ByIf1V

Previous
Mainland China version access configuration
Next
Rewarded Video Ad
Last modified: 2025-05-30Powered by