<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: JP Origin</title>
    <description>The latest articles on DEV Community by JP Origin (@jaydeep_khatrani_fb055086).</description>
    <link>https://dev.to/jaydeep_khatrani_fb055086</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4199524%2F5bcd5993-e046-4601-9e0f-3ba020e5e205.png</url>
      <title>DEV Community: JP Origin</title>
      <link>https://dev.to/jaydeep_khatrani_fb055086</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jaydeep_khatrani_fb055086"/>
    <language>en</language>
    <item>
      <title>I built an on-device overlay to debug Firebase Analytics events (no cable, no logcat)</title>
      <dc:creator>JP Origin</dc:creator>
      <pubDate>Thu, 22 Oct 2026 04:33:27 +0000</pubDate>
      <link>https://dev.to/jaydeep_khatrani_fb055086/i-built-an-on-device-overlay-to-debug-firebase-analytics-events-no-cable-no-logcat-2go0</link>
      <guid>https://dev.to/jaydeep_khatrani_fb055086/i-built-an-on-device-overlay-to-debug-firebase-analytics-events-no-cable-no-logcat-2go0</guid>
      <description>&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;Checking analytics events on Android usually means plugging in a cable, filtering logcat, or setting up Firebase DebugView. Testers can't easily do that on their own phones, so wrong events (bad names, too many params) often get found &lt;strong&gt;after release&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Event Box does
&lt;/h2&gt;

&lt;p&gt;Event Box is a small open-source library. A floating bubble sits on top of your app. Tap it and a panel shows events as they fire: number, time, name and params. Think of it as &lt;strong&gt;Firebase DebugView on the device itself&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fibfzkc51xxhu1mrnfy0s.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fibfzkc51xxhu1mrnfy0s.gif" alt="Event Box demo" width="320" height="711"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;⚠ &lt;strong&gt;Firebase limit warnings&lt;/strong&gt;: any event that breaks a rule (event name length, param count, value length, user property limits) gets a warning icon, and tapping it shows the exact reason.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resizable, pinnable panel&lt;/strong&gt;: draggable, snaps to the screen edge, shows an unread badge.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Background overlay mode&lt;/strong&gt; (opt-in): stays visible in recents (needs &lt;code&gt;SYSTEM_ALERT_WINDOW&lt;/code&gt; in your debug manifest).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Safe by design&lt;/strong&gt;: a kill switch, timed sessions that end by themselves, and logging that never throws into your app.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kotlin and Java&lt;/strong&gt;, minSdk 21, ships its own R8 rules, and events are exposed as &lt;code&gt;StateFlow&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="nf"&gt;implementation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"com.github.JpOriginDev:event-box:1.3.0"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;// via JitPack&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Application.onCreate()&lt;/span&gt;
&lt;span class="nc"&gt;OGEventBoxLog&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setDebugModeEnabled&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;BuildConfig&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;DEBUG&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setDebugModeDurationHours&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;install&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;// somewhere in your app (hidden gesture, debug menu)&lt;/span&gt;
&lt;span class="nc"&gt;OGEventBoxLog&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setEnabled&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nc"&gt;OGEventBoxLog&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"purchase"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;bundle&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  One-call wrapper (no double logging)
&lt;/h2&gt;

&lt;p&gt;Instead of calling &lt;code&gt;OGEventBoxLog.log()&lt;/code&gt; next to every analytics call, wrap your SDK once. It has no analytics dependency of its own, so it works with Firebase, Amplitude, Mixpanel or anything else:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;analytics&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OGEventBoxAnalytics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;wrap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;eventSink&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;params&lt;/span&gt; &lt;span class="p"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;firebaseAnalytics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;logEvent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;userPropertySink&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="p"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;firebaseAnalytics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setUserProperty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;analytics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;logEvent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"purchase"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;bundle&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The event goes to Event Box first (it never throws), then to your SDK. While the box is off, only your SDK call runs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest limitations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The Firebase checks are best-effort and may lag behind rule changes.&lt;/li&gt;
&lt;li&gt;No search or export yet.&lt;/li&gt;
&lt;li&gt;It is not a no-op in release builds. The panel shows event names and params on screen, which may include user data, so gate it with &lt;code&gt;BuildConfig.DEBUG&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The background overlay only lasts while Android keeps your process alive.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Feedback I'd love
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Would you use this, and what would stop you?&lt;/li&gt;
&lt;li&gt;Is the wrapper approach the right way to avoid double calls, or would you prefer something else?&lt;/li&gt;
&lt;li&gt;Search/filter and "share log as text" are next. Is anything more important?&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;GitHub (MIT): &lt;a href="https://github.com/JpOriginDev/event-box" rel="noopener noreferrer"&gt;https://github.com/JpOriginDev/event-box&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Issues and PRs welcome.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>android</category>
      <category>kotlin</category>
      <category>opensource</category>
      <category>firebase</category>
    </item>
  </channel>
</rss>
