package com.growthbeat.message;

public class GrowthMessage {

}

@@ -30,36 +30,2104 @@
 e;%0A%0A
-public class GrowthMessage %7B
+import android.content.Context;%0A%0Aimport com.growthbeat.CatchableThread;%0Aimport com.growthbeat.GrowthbeatCore;%0Aimport com.growthbeat.Logger;%0Aimport com.growthbeat.Preference;%0Aimport com.growthbeat.http.GrowthbeatHttpClient;%0A%0Apublic class GrowthMessage %7B%0A%0A%09public static final String LOGGER_DEFAULT_TAG = %22GrowthMessage%22;%0A%09public static final String HTTP_CLIENT_DEFAULT_BASE_URL = %22https://api.message.growthbeat.com/%22;%0A%09public static final String PREFERENCE_DEFAULT_FILE_NAME = %22growthmessage-preferences%22;%0A%0A%09private static final GrowthMessage instance = new GrowthMessage();%0A%09private final Logger logger = new Logger(LOGGER_DEFAULT_TAG);%0A%09private final GrowthbeatHttpClient httpClient = new GrowthbeatHttpClient(HTTP_CLIENT_DEFAULT_BASE_URL);%0A%09private final Preference preference = new Preference(PREFERENCE_DEFAULT_FILE_NAME);%0A%0A%09private String applicationId = null;%0A%09private String credentialId = null;%0A%0A%09private GrowthMessage() %7B%0A%09%09super();%0A%09%7D%0A%0A%09public static GrowthMessage getInstance() %7B%0A%09%09return instance;%0A%09%7D%0A%0A%09public void initialize(final Context context, final String applicationId, final String credentialId) %7B%0A%0A%09%09GrowthbeatCore.getInstance().initialize(context, applicationId, credentialId);%0A%0A%09%09this.applicationId = applicationId;%0A%09%09this.credentialId = credentialId;%0A%09%09this.preference.setContext(GrowthbeatCore.getInstance().getContext());%0A%0A%09%7D%0A%0A%09public String getApplicationId() %7B%0A%09%09return applicationId;%0A%09%7D%0A%0A%09public String getCredentialId() %7B%0A%09%09return credentialId;%0A%09%7D%0A%0A%09public Logger getLogger() %7B%0A%09%09return logger;%0A%09%7D%0A%0A%09public GrowthbeatHttpClient getHttpClient() %7B%0A%09%09return httpClient;%0A%09%7D%0A%0A%09public Preference getPreference() %7B%0A%09%09return preference;%0A%09%7D%0A%0A%09private static class Thread extends CatchableThread %7B%0A%0A%09%09public Thread(Runnable runnable) %7B%0A%09%09%09super(runnable);%0A%09%09%7D%0A%0A%09%09@Override%0A%09%09public void uncaughtException(java.lang.Thread thread, Throwable e) %7B%0A%09%09%09String message = %22Uncaught Exception: %22 + e.getClass().getName();%0A%09%09%09if (e.getMessage() != null)%0A%09%09%09%09message += %22; %22 + e.getMessage();%0A%09%09%09GrowthMessage.getInstance().getLogger().warning(message);%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%0A%09%7D
 %0A%0A%7D%0A

Add HttpClient, Preference and Logger into GrowthMessage class