Remove more Firebase related code
This commit is contained in:
parent
99d3f9db0c
commit
1da9764ed0
3 changed files with 1 additions and 28 deletions
|
@ -21,8 +21,6 @@ import androidx.preference.PreferenceManager;
|
|||
import com.google.android.gms.tasks.OnCompleteListener;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
import com.google.firebase.iid.FirebaseInstanceId;
|
||||
import com.google.firebase.iid.InstanceIdResult;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
|
@ -198,12 +196,6 @@ public class AboutFragment extends BaseFragment implements SdkStatusListener {
|
|||
onSdkReady();
|
||||
}
|
||||
}
|
||||
FirebaseInstanceId.getInstance().getInstanceId().addOnCompleteListener(new OnCompleteListener<InstanceIdResult>() {
|
||||
@Override
|
||||
public void onComplete(Task<InstanceIdResult> task) {
|
||||
Helper.setViewText(textFirebaseToken, task.isSuccessful() ? task.getResult().getToken() : getString(R.string.unknown));
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -4,8 +4,6 @@ import android.app.Activity;
|
|||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||
|
||||
public class LbryAnalytics {
|
||||
|
||||
public static final String EVENT_APP_ERROR = "app_error";
|
||||
|
@ -28,23 +26,15 @@ public class LbryAnalytics {
|
|||
public static final String EVENT_CHANNEL_CREATE = "channel_create";
|
||||
public static final String EVENT_SEARCH = "search";
|
||||
|
||||
private static FirebaseAnalytics analytics;
|
||||
|
||||
public static void init(Context context) {
|
||||
analytics = FirebaseAnalytics.getInstance(context);
|
||||
|
||||
}
|
||||
|
||||
public static void checkInitAnalytics(Context context) {
|
||||
if (analytics == null && context != null) {
|
||||
analytics = FirebaseAnalytics.getInstance(context);
|
||||
}
|
||||
}
|
||||
|
||||
public static void setCurrentScreen(Activity activity, String name, String className) {
|
||||
checkInitAnalytics(activity);
|
||||
if (analytics != null) {
|
||||
analytics.setCurrentScreen(activity, name, className);
|
||||
}
|
||||
}
|
||||
|
||||
public static void logEvent(String name) {
|
||||
|
@ -52,9 +42,6 @@ public class LbryAnalytics {
|
|||
}
|
||||
|
||||
public static void logEvent(String name, Bundle bundle) {
|
||||
if (analytics != null) {
|
||||
analytics.logEvent(name, bundle);
|
||||
}
|
||||
}
|
||||
|
||||
public static void logError(String message, String exceptionName) {
|
||||
|
|
|
@ -228,12 +228,6 @@ public final class Lbryio {
|
|||
}
|
||||
|
||||
Map<String, String> options = new HashMap<>();
|
||||
if (context instanceof MainActivity) {
|
||||
String firebaseToken = ((MainActivity) context).getFirebaseMessagingToken();
|
||||
if (!Helper.isNullOrEmpty(firebaseToken)) {
|
||||
options.put("firebase_token", firebaseToken);
|
||||
}
|
||||
}
|
||||
options.put("app_version", appVersion);
|
||||
options.put("app_id", Lbry.INSTALLATION_ID);
|
||||
options.put("node_id", "");
|
||||
|
|
Loading…
Reference in a new issue