Fabric -> Crashlytics
This commit is contained in:
parent
05ae932906
commit
e3baad5c57
@ -1,6 +1,6 @@
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'com.google.firebase.firebase-perf'
|
||||
apply plugin: 'io.fabric'
|
||||
apply plugin: 'com.google.firebase.crashlytics'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
@ -88,10 +88,10 @@ dependencies {
|
||||
})
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation 'com.orhanobut:logger:2.2.0'
|
||||
implementation 'com.google.firebase:firebase-core:17.2.2'
|
||||
implementation 'com.google.firebase:firebase-core:17.2.3'
|
||||
implementation 'com.google.firebase:firebase-crash:16.2.1'
|
||||
implementation 'com.google.firebase:firebase-perf:19.0.5'
|
||||
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
|
||||
implementation 'com.google.firebase:firebase-crashlytics:17.0.0-beta01'
|
||||
implementation 'androidx.appcompat:appcompat:1.1.0'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'com.google.android.material:material:1.1.0'
|
||||
@ -150,5 +150,5 @@ dependencies {
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'https://maven.fabric.io/public' }
|
||||
google()
|
||||
}
|
||||
|
||||
@ -65,9 +65,6 @@
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Light" />
|
||||
|
||||
<meta-data
|
||||
android:name="io.fabric.ApiKey"
|
||||
android:value="26f0d16c00d20fe74582627c831f26e30646a187" />
|
||||
<meta-data
|
||||
android:name="firebase_crashlytics_collection_enabled"
|
||||
android:value="true" />
|
||||
|
||||
@ -2,11 +2,10 @@ package it.integry.integrywmsnative.core.context;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.crashlytics.android.Crashlytics;
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics;
|
||||
import com.orhanobut.logger.AndroidLogAdapter;
|
||||
import com.orhanobut.logger.Logger;
|
||||
|
||||
import io.fabric.sdk.android.Fabric;
|
||||
import it.integry.integrywmsnative.BuildConfig;
|
||||
import it.integry.integrywmsnative.core.data_recover.ColliDataRecover;
|
||||
import it.integry.integrywmsnative.core.settings.SettingsManager;
|
||||
@ -47,14 +46,14 @@ public class AppContext {
|
||||
|
||||
private void initCrashlytics() {
|
||||
if(!BuildConfig.DEBUG) {
|
||||
Fabric.with(mContext, new Crashlytics());
|
||||
FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
|
||||
|
||||
if( SettingsManager.isInstanceAvailable() &&
|
||||
(SettingsManager.i().userSession != null && !UtilityString.isNullOrEmpty(SettingsManager.i().userSession.profileDB)) &&
|
||||
(SettingsManager.i().user != null && !UtilityString.isNullOrEmpty(SettingsManager.i().user.fullname))) {
|
||||
|
||||
Crashlytics.setString("user_fullname", SettingsManager.i().user.fullname);
|
||||
Crashlytics.setString("profile_db", SettingsManager.i().userSession.profileDB);
|
||||
crashlytics.setUserId(SettingsManager.i().user.fullname);
|
||||
crashlytics.setCustomKey("profile_db", SettingsManager.i().userSession.profileDB);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
package it.integry.integrywmsnative.core.utility;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.text.SpannableString;
|
||||
|
||||
import com.crashlytics.android.Crashlytics;
|
||||
import com.google.firebase.crashlytics.FirebaseCrashlytics;
|
||||
import com.orhanobut.logger.Logger;
|
||||
|
||||
import it.integry.integrywmsnative.BuildConfig;
|
||||
@ -46,8 +45,7 @@ public class UtilityExceptions {
|
||||
|
||||
if(!BuildConfig.DEBUG) {
|
||||
if(sendEmail) UtilityLogger.errorMe(ex);
|
||||
|
||||
Crashlytics.logException(ex.getCause());
|
||||
FirebaseCrashlytics.getInstance().recordException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -8,10 +8,6 @@ buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
google()
|
||||
|
||||
maven {
|
||||
url 'https://maven.fabric.io/public'
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.6.1'
|
||||
@ -19,8 +15,8 @@ buildscript {
|
||||
classpath 'com.google.gms:google-services:4.3.3'
|
||||
classpath 'com.google.firebase:perf-plugin:1.3.1'
|
||||
|
||||
// Add the Fabric Crashlytics plugin.
|
||||
classpath 'io.fabric.tools:gradle:1.31.2'
|
||||
// Add the Firebase Crashlytics Gradle plugin.
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0-beta02'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user