package com.ads.cal.picturetranslate;

import static com.anythink.network.pangle.PangleATConst.DEBUGGER_CONFIG.Pangle_NETWORK;

import android.content.Context;

import com.anythink.core.api.ATDebuggerConfig;
import com.anythink.core.api.ATSDK;

public class TopOnManager {
    private TopOnManager() {
    }

    private static class Holder {
        private static final TopOnManager INSTANCE = new TopOnManager();
    }

    public static TopOnManager get() {
        return Holder.INSTANCE;
    }

    public static final String TOPON_APP_ID = "a6501757a165c4";
    // Field from default config.
    public static final String TOPON_APP_KEY = "a53892abacdd1aebf0ea1d927ab0f0d88";

    private static final int init = 0;

    public void initSDK(Context context) {
        //SDK日志功能，集成测试阶段建议开启，上线前必须关闭
//        ATSDK.setNetworkLogDebug(true);

        //检查广告平台的集成状态，提交审核时需注释此API
        //ATSDK.integrationChecking(context);

//        ATSDK.setDebuggerConfig(
//                context,
//                "596795a7-b851-4514-bd7e-8561d641a968",
//                new ATDebuggerConfig.Builder(Pangle_NETWORK).build());

        if (init == 0) {
            return;
        }

        ATSDK.init(context, TOPON_APP_ID, TOPON_APP_KEY);
        //SDK版本
        LogUtils.d("TopOn SDK version: " + ATSDK.getSDKVersionName());

        //(v5.7.77新增) 打印当前设备的设备信息(IMEI、OAID、GAID、AndroidID等)
//        ATSDK.testModeDeviceInfo(context, new DeviceInfoCallback() {
//            @Override
//            public void deviceInfo(String deviceInfo) {
//                Log.i(TAG, "deviceInfo: " + deviceInfo);
//            }
//        });
    }
}
