Skip to content

ES SDK disables Firebase Analytics in apps by default #118

@barbeau

Description

@barbeau

Summary:

We recently integrated Firebase Analytics in OneBusAway, but no events were showing up in our dashboard. After some debugging we eventually figured out that this line in the ES SDK manifest disables Firebase Analytics in OneBusAway, because the manifests get merged during builds:

<meta-data android:name="firebase_analytics_collection_deactivated" android:value="true" />

So, in OneBusAway we had to add this line in our manifest to enable Firebase analytics:

        <meta-data android:name="firebase_analytics_collection_deactivated" android:value="false"
                   tools:replace="android:value"/>

Because Firebase Analytics is typically enabled by default without any edits needed to the manifest, this solution wasn't an obvious one.

If possible I'd suggest removing the line from the ES SDK so that other apps that use Firebase Analytics don't have the same issue.

Steps to reproduce:

  1. Checkout OBA master branch at this commit - OneBusAway/onebusaway-android@e6520ba
  2. Start an emulator and enable Firebase debugging client-side via:
adb shell setprop log.tag.FA VERBOSE
adb shell setprop log.tag.FA-SVC VERBOSE
adb logcat -v time -s FA FA-SVC
  1. Start OBA and look at the terminal log from Firebase

Expected behavior:

Firebase Analytics should be enabled within OBA and you should see debugging messages logging events

Observed behavior:

The log shows App measurement disabled.

Device, Android, and Embedded Social SDK version:

    // Embedded Social SDK
    implementation('com.acrowntest.test:sdk:0.7.4@aar') {
        transitive = true
    }

OBA master branch at this commit (prior to adding the entry to our manifest) - OneBusAway/onebusaway-android@e6520ba

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions