Skip to content

Commit

Permalink
Comment out Crashlytics
Browse files Browse the repository at this point in the history
  • Loading branch information
fgl27 committed Sep 23, 2024
1 parent bcd6e38 commit b421b6a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions apk/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apply from: '../versions.gradle'
apply plugin: 'com.android.application'

//Crashlytics
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
//apply plugin: 'com.google.gms.google-services'
//apply plugin: 'com.google.firebase.crashlytics'
//Crashlytics end

android {
Expand Down
8 changes: 4 additions & 4 deletions apk/app/src/main/java/com/fgl27/twitch/PlayerActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
import com.fgl27.twitch.channels.ChannelsUtils;
import com.fgl27.twitch.notification.NotificationUtils;
import com.google.firebase.FirebaseApp;
import com.google.firebase.crashlytics.FirebaseCrashlytics;
//import com.google.firebase.crashlytics.FirebaseCrashlytics;
import com.google.gson.Gson;

import net.grandcentrix.tray.AppPreferences;
Expand Down Expand Up @@ -339,8 +339,8 @@ protected void onCreate(Bundle savedInstanceState) {
intent.setAction(null);
setIntent(intent);

FirebaseApp.initializeApp(this);
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(true);
//FirebaseApp.initializeApp(this);
//FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(true);

try {
setContentView(R.layout.activity_player);
Expand Down Expand Up @@ -434,7 +434,7 @@ protected void onCreate(Bundle savedInstanceState) {
initializeWebview();

StopNotificationService();
FirebaseCrashlytics.getInstance().sendUnsentReports();
//FirebaseCrashlytics.getInstance().sendUnsentReports();

DataThreadPool.execute(() -> Tools.GetUpdateFile(getApplicationContext()));

Expand Down
10 changes: 5 additions & 5 deletions apk/app/src/main/java/com/fgl27/twitch/Tools.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

import com.fgl27.twitch.DataSource.DefaultHttpDataSource;
import com.fgl27.twitch.notification.NotificationService;
import com.google.firebase.crashlytics.FirebaseCrashlytics;
//import com.google.firebase.crashlytics.FirebaseCrashlytics;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

Expand Down Expand Up @@ -1045,21 +1045,21 @@ public static void recordException(String TAG, String message, Throwable e) {

try {

FirebaseCrashlytics.getInstance().log(TAG + " " + message);
//FirebaseCrashlytics.getInstance().log(TAG + " " + message);

if (e != null) {

FirebaseCrashlytics.getInstance().recordException(e);
//FirebaseCrashlytics.getInstance().recordException(e);
Log.w(TAG, message, e);

} else {

FirebaseCrashlytics.getInstance().recordException(new RuntimeException(TAG + " e " + message));
//FirebaseCrashlytics.getInstance().recordException(new RuntimeException(TAG + " e " + message));
Log.w(TAG, message);

}

FirebaseCrashlytics.getInstance().sendUnsentReports();
//FirebaseCrashlytics.getInstance().sendUnsentReports();
} catch (Exception ignore) {//Just in case prevent a crash sending a crash
}

Expand Down
4 changes: 2 additions & 2 deletions apk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ buildscript {
classpath 'com.android.tools.build:gradle:8.6.1'//update gradlew -> ./gradlew wrapper

//Crashlytics
classpath 'com.google.gms:google-services:4.4.2'
classpath 'com.google.firebase:firebase-crashlytics-gradle:3.0.2'
//classpath 'com.google.gms:google-services:4.4.2'
//classpath 'com.google.firebase:firebase-crashlytics-gradle:3.0.2'
//Crashlytics end

// NOTE: Do not place your application dependencies here; they belong
Expand Down

0 comments on commit b421b6a

Please sign in to comment.