Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Google Analytics introduced by Firebase #2657

Closed
alexara opened this issue May 30, 2018 · 7 comments
Closed

Disable Google Analytics introduced by Firebase #2657

alexara opened this issue May 30, 2018 · 7 comments

Comments

@alexara
Copy link

alexara commented May 30, 2018

Since you have introduced Firebase, you might need to explicitly disable Google Analytics (https://firebase.google.com/docs/analytics/). :-)

The instruction https://firebase.google.com/docs/analytics/android/start/ actually says:

Getting started with Analytics is easy. Just add the Firebase SDK to your new or existing app, and data collection begins automatically

Analytics automatically logs some events and user properties; you don't need to add any code to enable them.

So how can you disable the Analytics?

If you have a look at https://firebase.google.com/docs/android/setup#available_libraries it says that the firebase-core library corresponds to the Analytics part of FireBase.
The firebase-core is pulled in as a dependency automatically once you add the Firebase SDK to you project.

Hence you would like to remove it:

exclude group: 'com.google.firebase', module: 'firebase-core'
}

The official guide to disable Analytics does not tell you about this solution (or at least it's pretty good hidden) and suggests another:

Permanently deactivate collection

If you need to deactivate Analytics collection permanently in a version of your app, set firebase_analytics_collection_deactivated to true in your app's AndroidManifest.xml in the application tag. For example:

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

Disable Advertising ID collection
y
If you wish to disable collection of the Advertising ID in your Android app, you can set the value of google_analytics_adid_collection_enabled to false in your app's AndroidManifest.xml in the application tag. For example:

<meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />

Source: https://firebase.google.com/support/guides/disable-analytics

See also https://stackoverflow.com/questions/39327141/disable-the-analytics-service-for-firebase-cloud-messaging

PS: Nextcloud Talk for Android already disabled it:

@mario
Copy link
Contributor

mario commented May 30, 2018

Firebase Analytics was already removed.

@mario mario closed this as completed May 30, 2018
@mario
Copy link
Contributor

mario commented May 30, 2018

@alexara let me know if you find this not correct, but it really shouldn't be in the APK.

@alexara
Copy link
Author

alexara commented May 30, 2018

Where and how? I searched for "firebase" but it not find anything in this repository that shows that it is disabled. Can you point me to the commit?

@mario
Copy link
Contributor

mario commented May 30, 2018

We removed the firebase-core dependency and I don't think firebase-messaging pulls it in.

The other two things you can add in Manifest are not really needed in case you don't have Firebase Core.

@alexara
Copy link
Author

alexara commented May 30, 2018

But why did you add it in the first place? c7eed23

We removed the firebase-core dependency and I don't think firebase-messaging pulls it in.

I thought it gets pulled in as inputmice stated here https://github.com/siacs/Conversations/issues/3041

By looking at the merged manifest excluding it seems to work...
But it was pulled in as a dependency.

Well, if I find some more time and proof you wrong I will comment on it again ;-)

@mario
Copy link
Contributor

mario commented May 30, 2018

Because we had a user that wanted to use Analytics for themselves?

@alexara
Copy link
Author

alexara commented May 30, 2018

Because we had a user that wanted to use Analytics for themselves?

Never mind, I read the comments on the PR. :-) Sorry for taking your time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants