Idle Tower v2.48版本的 MD5 值为:56f20496f6a85726b376356ed2ecee23
以下内容为反编译后的 Yodo1MasThinkingData.java 源代码,内容仅作参考
package com.yodo1.mas.analytics;
import android.content.Context;
import android.text.TextUtils;
import cn.thinkinganalyticsclone.android.ThinkingAnalyticsSDK;
import com.yodo1.mas.Yodo1MasLog;
import com.yodo1.mas.utils.JSONUtils;
import com.yodo1.mas.utils.Yodo1MasUtils;
import java.util.ArrayList;
import org.json.JSONObject;
public class Yodo1MasThinkingData {
private static final String KEY_APP_ID_PRODUCTION = "564155fdc6124849a2b4a8537e23c1fb";
private static final String KEY_APP_ID_TEST = "e38a354a59034f89a9fedc0489ee0d91";
private static final String TAG = "[Yodo1MasThinkingData]";
private static final String URL_THINKING_DATA = "https://c1.yodo1.com";
private static ThinkingAnalyticsSDK thinkingAnalyticsSDK;
public static void initWithAppKey(Context context, JSONObject jSONObject, boolean z) {
Yodo1MasLog.d(TAG, "isDebug = " + z);
String str = z ? KEY_APP_ID_TEST : KEY_APP_ID_PRODUCTION;
if (Yodo1MasUtils.getMetaData(context, "com.yodo1.mas.data_analytics.EnableLogging", false)) {
ThinkingAnalyticsSDK.enableTrackLog(true);
}
ThinkingAnalyticsSDK.calibrateTimeWithNtp("time1.apple.com");
if (thinkingAnalyticsSDK == null) {
ThinkingAnalyticsSDK sharedInstance = ThinkingAnalyticsSDK.sharedInstance(context, str, URL_THINKING_DATA);
thinkingAnalyticsSDK = sharedInstance;
Yodo1MasLog.d(TAG, String.format("The Thinking SDK has been initialized, the Distinct ID %s, Device ID %s ", sharedInstance.getDistinctId(), thinkingAnalyticsSDK.getDeviceId()));
if (jSONObject != null) {
thinkingAnalyticsSDK.setSuperProperties(jSONObject);
Yodo1MasLog.d(TAG, "The super properties have been registered, the value: " + JSONUtils.formatJson(thinkingAnalyticsSDK.getSuperProperties().toString()));
}
ArrayList arrayList = new ArrayList();
arrayList.add(ThinkingAnalyticsSDK.AutoTrackEventType.APP_INSTALL);
arrayList.add(ThinkingAnalyticsSDK.AutoTrackEventType.APP_START);
arrayList.add(ThinkingAnalyticsSDK.AutoTrackEventType.APP_END);
arrayList.add(ThinkingAnalyticsSDK.AutoTrackEventType.APP_VIEW_SCREEN);
arrayList.add(ThinkingAnalyticsSDK.AutoTrackEventType.APP_CLICK);
arrayList.add(ThinkingAnalyticsSDK.AutoTrackEventType.APP_CRASH);
thinkingAnalyticsSDK.enableAutoTrack(arrayList);
}
}
public static void trackEvent(String str, JSONObject jSONObject) {
if (thinkingAnalyticsSDK == null) {
return;
}
if (TextUtils.isEmpty(str)) {
Yodo1MasLog.d(TAG, "Failed to track event because the event id is null");
return;
}
try {
if (jSONObject == null) {
thinkingAnalyticsSDK.track(str);
} else {
thinkingAnalyticsSDK.track(str, jSONObject);
}
} catch (Exception e) {
e.printStackTrace();
}
}
public static String getTDDistinctId() {
ThinkingAnalyticsSDK thinkingAnalyticsSDK2 = thinkingAnalyticsSDK;
if (thinkingAnalyticsSDK2 != null) {
return thinkingAnalyticsSDK2.getDistinctId();
}
return null;
}
public static String getTDDeviceId() {
ThinkingAnalyticsSDK thinkingAnalyticsSDK2 = thinkingAnalyticsSDK;
if (thinkingAnalyticsSDK2 != null) {
return thinkingAnalyticsSDK2.getDeviceId();
}
return null;
}
}