|
@ -9,6 +9,8 @@ import android.support.v4.content.ContextCompat; |
|
|
import android.util.DisplayMetrics; |
|
|
import android.util.DisplayMetrics; |
|
|
import android.widget.ImageView; |
|
|
import android.widget.ImageView; |
|
|
|
|
|
|
|
|
|
|
|
import com.crashlytics.android.Crashlytics; |
|
|
|
|
|
import com.crashlytics.android.core.CrashlyticsCore; |
|
|
import com.franmontiel.persistentcookiejar.PersistentCookieJar; |
|
|
import com.franmontiel.persistentcookiejar.PersistentCookieJar; |
|
|
import com.franmontiel.persistentcookiejar.cache.SetCookieCache; |
|
|
import com.franmontiel.persistentcookiejar.cache.SetCookieCache; |
|
|
import com.franmontiel.persistentcookiejar.persistence.SharedPrefsCookiePersistor; |
|
|
import com.franmontiel.persistentcookiejar.persistence.SharedPrefsCookiePersistor; |
|
@ -30,6 +32,7 @@ import gr.thmmy.mthmmy.BuildConfig; |
|
|
import gr.thmmy.mthmmy.R; |
|
|
import gr.thmmy.mthmmy.R; |
|
|
import gr.thmmy.mthmmy.session.SessionManager; |
|
|
import gr.thmmy.mthmmy.session.SessionManager; |
|
|
import gr.thmmy.mthmmy.utils.CrashReportingTree; |
|
|
import gr.thmmy.mthmmy.utils.CrashReportingTree; |
|
|
|
|
|
import io.fabric.sdk.android.Fabric; |
|
|
import okhttp3.HttpUrl; |
|
|
import okhttp3.HttpUrl; |
|
|
import okhttp3.Interceptor; |
|
|
import okhttp3.Interceptor; |
|
|
import okhttp3.OkHttpClient; |
|
|
import okhttp3.OkHttpClient; |
|
@ -59,6 +62,13 @@ public class BaseApplication extends Application { |
|
|
super.onCreate(); |
|
|
super.onCreate(); |
|
|
baseApplication = this; //init singleton
|
|
|
baseApplication = this; //init singleton
|
|
|
|
|
|
|
|
|
|
|
|
// Set up Crashlytics, disabled for debug builds
|
|
|
|
|
|
Crashlytics crashlyticsKit = new Crashlytics.Builder() |
|
|
|
|
|
.core(new CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build()) |
|
|
|
|
|
.build(); |
|
|
|
|
|
// Initialize Fabric with the debug-disabled crashlytics.
|
|
|
|
|
|
Fabric.with(this, crashlyticsKit); |
|
|
|
|
|
// Initialize timber
|
|
|
if (BuildConfig.DEBUG) { |
|
|
if (BuildConfig.DEBUG) { |
|
|
Timber.plant(new Timber.DebugTree()); |
|
|
Timber.plant(new Timber.DebugTree()); |
|
|
} else { |
|
|
} else { |
|
|