com.eg.agent.android.AgentConfiguration Maven / Gradle / Ivy
package com.eg.agent.android;
import com.eg.agent.android.analytics.AnalyticAttributeStore;
import com.eg.agent.android.crashes.CrashStore;
import com.eg.google.gson.JsonObject;
import com.eg.google.gson.JsonPrimitive;
import java.util.UUID;
public class AgentConfiguration {
// public static String AndroidAppCommonDetails= "com.eg.AndroidAppCommonDetails";
public static String AndroidAppCommonDetails = "192.168.8.40:7077/final/servlet/com.eg.EgAndroidAgentDetails";
private static final String DEFAULT_COLLECTOR_HOST = "mobile-collector.eg.com";
public static boolean useSsl = false;
public static String applicationName = "";
public static String applicationToken="";
public static final String AgnetVERSION = "1.0";
public static final String AgentName = "EgAgent";
private boolean reportCrashes = true;
private String collectorHost = DEFAULT_COLLECTOR_HOST;
private boolean enableAnalyticsEvents = true;
private ApplicationPlatform applicationPlatform = ApplicationPlatform.Native;
private String applicationPlatformVersion = Agent.getVersion();
private AnalyticAttributeStore analyticAttributeStore;
private String sessionID = provideSessionId();
private CrashStore crashStore;
public static JsonObject asJsonObject() {
JsonObject data = new JsonObject();
data.add("AgentName", new JsonPrimitive(AgentName));
data.add("AgentVersion", new JsonPrimitive(AgnetVERSION));
return data;
}
public static void setDEFAULT_COLLECTOR_HOST(String ipaddress) {
}
public static String getCrashCollectorHost() {
return AndroidAppCommonDetails;
}
public String getCustomApplicationVersion() {
return "";
}
public String getCustomBuildIdentifier() {
return "";
}
public boolean getReportCrashes() {
return reportCrashes;
}
public boolean getEnableAnalyticsEvents() {
return this.enableAnalyticsEvents;
}
public ApplicationPlatform getApplicationPlatform() {
return this.applicationPlatform;
}
public void setApplicationPlatform(ApplicationPlatform applicationPlatform) {
this.applicationPlatform = applicationPlatform;
}
public String getApplicationPlatformVersion() {
return (this.applicationPlatformVersion == null || this.applicationPlatformVersion.isEmpty()) ? Agent.getVersion() : this.applicationPlatformVersion;
}
public void setApplicationPlatformVersion(String applicationPlatformVersion) {
this.applicationPlatformVersion = applicationPlatformVersion;
}
public AnalyticAttributeStore getAnalyticAttributeStore() {
return this.analyticAttributeStore;
}
public void setAnalyticAttributeStore(AnalyticAttributeStore analyticAttributeStore) {
this.analyticAttributeStore = analyticAttributeStore;
}
public String getSessionID() {
return this.sessionID;
}
protected String provideSessionId() {
this.sessionID = UUID.randomUUID().toString();
return this.sessionID;
}
public String getApplicationToken() {
return this.applicationToken;
}
public void setApplicationToken(String applicationToken)
{
this.applicationToken=applicationToken;
System.out.println("Token "+getApplicationToken());
}
public boolean useSsl() {
return this.useSsl;
}
public void setUseSsl(boolean useSsl) {
this.useSsl = useSsl;
}
public CrashStore getCrashStore() {
return this.crashStore;
}
public void setCrashStore(CrashStore crashStore) {
this.crashStore = crashStore;
}
public String getCollectorHost() {
return this.collectorHost;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy