firebase-analytics icon indicating copy to clipboard operation
firebase-analytics copied to clipboard

DebugView in Android?

Open oscarpedrero opened this issue 5 years ago • 4 comments

How to setup in Android with debugview?

Thanks.

oscarpedrero avatar Apr 06 '20 12:04 oscarpedrero

After some investigation setting up Android for use with the debug view is easy. Simply following the instructions in this post: https://support.google.com/firebase/answer/7201382?hl=en

In short:

To enable Analytics Debug mode on an emulated Android device, execute the following command line:

adb shell setprop debug.firebase.analytics.app <package_name>

This behavior persists until you explicitly disable Debug mode by executing the following command line:

adb shell setprop debug.firebase.analytics.app .none.

Mathyn avatar May 25 '20 13:05 Mathyn

Is there a way to set up DebugView in Android at build time instead with adb? The goal would be that when buildType is debug then DebugView is enabled and when buildType is release DebugView is disabled.

zoranlj avatar Feb 10 '22 17:02 zoranlj

Also curious for a way without adb as @zoranlj mentioned. Any news on this?

sneko avatar May 04 '22 08:05 sneko

Yes, it's really inconvenient on Android in comparison to iOS where it's possible to set environment parameter in runtime.

      var newArguments = ProcessInfo.processInfo.arguments
      newArguments.append("-FIRDebugEnabled")
      ProcessInfo.processInfo.setValue(newArguments, forKey: "arguments")

Our QA people always complain about this dance with adb they have to do every time they check events on Android 🙈

OlKir avatar Feb 16 '23 10:02 OlKir