|
@@ -1,8 +1,11 @@
|
|
|
package com.atmob.voiceai.sdk.kochava;
|
|
package com.atmob.voiceai.sdk.kochava;
|
|
|
|
|
|
|
|
import android.app.Application;
|
|
import android.app.Application;
|
|
|
|
|
+import android.content.Context;
|
|
|
|
|
+import android.os.Build;
|
|
|
import android.os.Handler;
|
|
import android.os.Handler;
|
|
|
import android.os.Looper;
|
|
import android.os.Looper;
|
|
|
|
|
+import android.webkit.WebSettings;
|
|
|
|
|
|
|
|
import com.atmob.common.runtime.ContextUtil;
|
|
import com.atmob.common.runtime.ContextUtil;
|
|
|
import com.atmob.common.runtime.ProcessUtil;
|
|
import com.atmob.common.runtime.ProcessUtil;
|
|
@@ -23,6 +26,7 @@ public class KochavaHelper {
|
|
|
private static final List<AttributionResultCallback> callbacks = new ArrayList<>(5);
|
|
private static final List<AttributionResultCallback> callbacks = new ArrayList<>(5);
|
|
|
private static final Handler handler = new Handler(Looper.getMainLooper());
|
|
private static final Handler handler = new Handler(Looper.getMainLooper());
|
|
|
private static Boolean attributed;
|
|
private static Boolean attributed;
|
|
|
|
|
+ private static String userAgent;
|
|
|
|
|
|
|
|
public static void init(Application application, FirebaseHelper firebaseHelper) {
|
|
public static void init(Application application, FirebaseHelper firebaseHelper) {
|
|
|
if (BuildConfig.DEBUG) {
|
|
if (BuildConfig.DEBUG) {
|
|
@@ -41,6 +45,7 @@ public class KochavaHelper {
|
|
|
} else {
|
|
} else {
|
|
|
onAttributionResult(currentInstallAttribution);
|
|
onAttributionResult(currentInstallAttribution);
|
|
|
}
|
|
}
|
|
|
|
|
+ userAgent = System.getProperty("http.agent");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private static void onAttributionResult(InstallAttributionApi installAttributionApi) {
|
|
private static void onAttributionResult(InstallAttributionApi installAttributionApi) {
|
|
@@ -91,13 +96,14 @@ public class KochavaHelper {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public static String getUserAgent() {
|
|
|
|
|
+ return userAgent;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public static boolean isAttributed() {
|
|
public static boolean isAttributed() {
|
|
|
return attributed != null && attributed;
|
|
return attributed != null && attributed;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public static String getDeviceId() {
|
|
|
|
|
- return Tracker.getInstance().getDeviceId();
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
@FunctionalInterface
|
|
@FunctionalInterface
|
|
|
public interface AttributionResultCallback {
|
|
public interface AttributionResultCallback {
|