From cac5a2fb21efc7faf6f17f602966054ee21bb5b2 Mon Sep 17 00:00:00 2001 From: Arsentiy Milchakov Date: Wed, 14 Sep 2016 12:59:28 +0300 Subject: [PATCH] Alohalytics installation id was added into crashlytics --- android/src/com/mapswithme/maps/MwmApplication.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/android/src/com/mapswithme/maps/MwmApplication.java b/android/src/com/mapswithme/maps/MwmApplication.java index 7bf3d5ceef..d59f48c5b7 100644 --- a/android/src/com/mapswithme/maps/MwmApplication.java +++ b/android/src/com/mapswithme/maps/MwmApplication.java @@ -30,6 +30,7 @@ import com.mapswithme.util.Config; import com.mapswithme.util.Constants; import com.mapswithme.util.ThemeSwitcher; import com.mapswithme.util.UiUtils; +import com.mapswithme.util.Utils; import com.mapswithme.util.statistics.PushwooshHelper; import com.mapswithme.util.statistics.Statistics; import com.pushwoosh.PushManager; @@ -104,6 +105,10 @@ public class MwmApplication extends Application super.onCreate(); mMainLoopHandler = new Handler(getMainLooper()); + // Alohalytics generates installation id, + // it should be initialized before Crashlytics. + Statistics s = Statistics.INSTANCE; + initHockeyApp(); initCrashlytics(); initPushWoosh(); @@ -116,10 +121,6 @@ public class MwmApplication extends Application nativeInitPlatform(getApkPath(), getStoragePath(settingsPath), getTempPath(), getObbGooglePath(), BuildConfig.FLAVOR, BuildConfig.BUILD_TYPE, UiUtils.isTablet()); - // Workaround to initialize alohalytics for transferring http requests. - // Http wrapper should be cut out from the alohalytics in the future. - Statistics s = Statistics.INSTANCE; - mPrefs = getSharedPreferences(getString(R.string.pref_file_name), MODE_PRIVATE); mBackgroundTracker = new AppBackgroundTracker(); TrackRecorder.init(); @@ -183,7 +184,10 @@ public class MwmApplication extends Application return; Fabric.with(this, new Crashlytics(), new CrashlyticsNdk()); + nativeInitCrashlytics(); + + Crashlytics.setString("AlohalyticsInstallationId", Utils.getInstallationId()); } public boolean isFrameworkInitialized()