firebase-android-sdk
firebase-android-sdk copied to clipboard
Firebase-analytics adds Ad dependecy
When I'm using com.google.firebase:firebase-analytics:18.0.2 package com.google.android.gms.ads.identifier.AdvertisingIdClient appears into my apk. And Play Console show warning "Ad SDK found"
I want to have a way to use firebase analytics without AD SDK.
Similar issue https://github.com/invertase/react-native-firebase/issues/3617
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Hi @shumidub thanks for reaching out. Per this help center article: "By default, the Firebase SDK collects identifiers for mobile devices (for example, Android Advertising ID and Advertising Identifier for iOS) ..."
This is done to enable attribution, as well as reporting on demographics and interests. If you'd like to continue reporting Ad ID, Google Play now requires publishers that collect Ad ID to submit a privacy policy. Otherwise If the developer doesn't want to collect Ad ID, they can disable collection instead.
But after add meta-data to Manifest Ads classes also is in apk
And Google Play show warning
I have same error on Google Play (And I havn't this error month ago):
But in my project havn't AdMob, only Firebase:
// Firebase
implementation platform('com.google.firebase:firebase-bom:26.6.0')
implementation 'com.google.firebase:firebase-core'
implementation 'com.google.firebase:firebase-messaging'
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'
How I can delete AdMob SDK from App without deleting Firebase? Becouse I need to publish app without advertising.
Thanks https://github.com/invertase/react-native-firebase/issues/3617.
The problem with AdMob SDK is in com.google.android.gms:play-services-ads-identifier
that is inside com.google.firebase:firebase-core
and com.google.firebase:firebase-analytics
For fixing I change my dependencing like this:
// Firebase
implementation platform('com.google.firebase:firebase-bom:26.6.0')
implementation ('com.google.firebase:firebase-core') {
exclude group: 'com.google.android.gms', module : 'play-services-ads-identifier'
}
implementation ('com.google.firebase:firebase-messaging') {
exclude group: 'com.google.android.gms', module : 'play-services-ads-identifier'
}
implementation ('com.google.firebase:firebase-crashlytics') {
exclude group: 'com.google.android.gms', module : 'play-services-ads-identifier'
}
implementation ('com.google.firebase:firebase-analytics') {
exclude group: 'com.google.android.gms', module : 'play-services-ads-identifier'
}
And now my Firebase working and Google Play don't show warnings:
P.S: Sorry that Russian on screenshots. This is becouse I don't know how to change language in Google Play Console. But I hope that you understand main idea of screenshots.
Unfortunately this error came again, and my fixing don't working :(
May be it becouse Google AdMob test needs time to update information.
Perhaps this fix will help. I'll write about the results later.
configurations.all {
exclude group: 'com.google.android.gms', module : 'play-services-ads'
exclude group: 'com.google.android.gms', module : 'play-services-ads-identifier'
exclude group: 'com.google.android.gms', module : 'play-services-ads-lite'
}
dependencies {
// ...
// Firebase
implementation platform('com.google.firebase:firebase-bom:26.6.0')
implementation 'com.google.firebase:firebase-messaging'
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'
// ...
}
Unfortunatelly my fix not working :( Does anybody knows how to fix it?
Analytics use: The advertising identifier may only be connected to personally-identifiable information or associated with any persistent device identifier (for example: SSAID, MAC address, IMEI, etc.) with the explicit consent of the user
https://support.google.com/googleplay/android-developer/answer/10808976?hl=en
I want to disable collecting ads id from my application for my peace of mind
And I want to remove com.google.android.gms:play-services-ads-identifier dependency from my app to hide "Ads warning" in the Play Console
Hi all, Sorry for getting back late. To disable id collection, please follow our guide here and I've submitted a request to fix the Ads warning in Google Play. I'll keep you posted.
Hi there,
I'm using ionic 3 with cordova-plugin-firebasex and got warning in play store.
I found that this can be solved by adding exclude module: "play-services-ads-identifier" to build.gradle.
But when I do ionic cordova build android, it overwrites the changes in build.gradle file.
So is there any way to remove the admob sdk (play-services-ads-identifier) from ionic 3 project?
Hi all, Sorry for getting back late. To disable id collection, please follow our guide here and I've submitted a request to fix the Ads warning in Google Play. I'll keep you posted.
I add to AndroidManifest.xml:
<meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />
But after publish to GooglePlay I get "SDK AdMob" again. And this not fixed the problem.
Analytics use: The advertising identifier may only be connected to personally-identifiable information or associated with any persistent device identifier (for example: SSAID, MAC address, IMEI, etc.) with the explicit consent of the user
https://support.google.com/googleplay/android-developer/answer/10808976?hl=en
Sorry, this page can't be found.
Dear developers of Firebase. Can you connect to developers of GooglePlay? You have been working for the same company Google. Please fix this bug with developers of GooglePlay. May be this bug in GooglePlay?
Hello. Are there any new developments for issue?
You can just add to the AndroidManifest to remove the 'AD_ID' permission and then also tell the Firebase Analytics SDK not to collect it.
The documentation for the class included by the play-services-ads-identifier, explains how the AD ID is used and how to avoid any transitive dependencies from adding the permission.
https://developers.google.com/android/reference/com/google/android/gms/ads/identifier/AdvertisingIdClient.Info#getId()
I can see part of this was already posted, but just included it for completeness and discoverability.
AndroidManifest.xml
<uses-permission
android:name="com.google.android.gms.permission.AD_ID"
tools:node="remove" />
<meta-data
android:name="google_analytics_adid_collection_enabled"
android:value="false" />
Faced with same issue
Will firebase.json
{
"react-native": {
"google_analytics_adid_collection_enabled": false
}
}
work instead of
<meta-data
android:name="google_analytics_adid_collection_enabled"
android:value="false" />
?
Of course with
<uses-permission
android:name="com.google.android.gms.permission.AD_ID"
tools:node="remove" />
D
This not work with a android studio Firebase project, the permission is not on the merged manifest anymore, but google still showing the erro message
I just selected yes in the Play Console.
I just selected yes in the Play Console.
you just selected yes and worked ?
@M001T Yes.
I have Contacted to Google Play support they replied that if you use analytics, you need to choose YES on The AD_ID permission for analytics use case on Advertising ID section.
You should not remove permission manually or remove analytics sub-modules which contains AD_ID permission since it can break things...
So just need to choose YES even if the app is not using Ads All you have to do is: Go to Google play console App Content -> Advertising ID section -> Choose Yes and mark the Analytics option and check Turn off release errors check box
.
I have Contacted to Google Play support they replied that if you use analytics, you need to choose YES on The AD_ID permission for analytics use case on Advertising ID section.
You should not remove permission manually or remove analytics sub-modules which contains AD_ID permission since it can break things...
So just need to choose YES even if the app is not using Ads All you have to do is: Go to Google play console App Content -> Advertising ID section -> Choose Yes and mark the Analytics option and check Turn off release errors check box
.
Why would they need to ask if they force it anyway?
IMO App functionality, Analytics & Developer Communications should be seperated from "advertising ID"
@aguatno please this is become urgent. Google Play now block apps from releasing
My app doesn't have ads. Just Firebase Analytics
Even doing all this the google play still complains:
in the manifest
<uses-permission
android:name="com.google.android.gms.permission.AD_ID"
tools:node="remove" />
inside application tag
<meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />
and dependency:
implementation(platform("com.google.firebase:firebase-bom:30.4.1")
implementation("com.google.firebase:firebase-analytics-ktx") {
exclude(module = "play-services-ads-identifier")
}
Nothing, the Google Play still complains with that error when trying to create a new release
With apologies - I need everyone to understand that I/we are not in control of this here. The repo you want to chase down is firebase-android-sdk / possibly in concert with Play Store support. I am sorry that I can't be more help but this is not something we add here or control here.
I see you have posted there as well, so this is largely duplicate: https://github.com/firebase/firebase-android-sdk/issues/2582
I will only leave this open for information purposes / possible updates only, but that bug 2582 over on firebase-android-sdk is the one to follow. Then if they release a change we can adopt it here as needed
Hi @danielesegato, could you try removing the code you've altered, and add the solution provided by kunwar295? If I'm not mistaken, there's no extra code setup needed. All that's needed is the declaration that an Advertising ID is being used in third party library (Firebase Analytics). This can be done through your Google Play Console, and that should be sufficient enough to remove the error.
I don't think there should be any more issue here since this should be working after proper declaration in Google Play Console. I'll close this issue for now. If this is still not working, let me know and I'll reopen the issue. Thanks!
@danielesegato and others - for some reason adding <uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove" />
is what caused the permission to appear in my merged manifest. As soon as I removed this line, everything was fine.
Firebase services I use
My app includes no ads whatsoever. All I want is crashlytics, performance monitoring and analytics:
dependencies {
implementation platform('com.google.firebase:firebase-bom:29.1.0')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-perf'
implementation 'com.google.firebase:firebase-firestore'
}
Configuration that worked for me
With the configuration as below I was able to get rid of the warning in GooglePlay console:
app/build.gradle
configurations.all {
exclude group: 'com.google.android.gms', module : 'play-services-ads'
exclude group: 'com.google.android.gms', module : 'play-services-ads-identifier'
exclude group: 'com.google.android.gms', module : 'play-services-ads-lite'
}
app/src/main/AndroidManifest.xml
<meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />
<meta-data android:name="google_analytics_default_allow_ad_personalization_signals" android:value="false" />
Again, if you have the following line in your AndroidManifest, ⚠️try removing it.
<!-- remove this -->
<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove" />
![image](https://user-images.githubusercontent.com/4188984/193052626-b7f74cf1-0e51-4fb9-868c-dc9b8fdfdea9.png)
I want explicit documentation for requiring Ad ID usage declaration for analytics dependency. Is it play store bug or requirements? I can't know.
Hi @jeiea, you could check out the documentation which contains the explanation for requiring Ad ID, under the section of Identifiers for mobile devices.
The Google Analytics for Firebase SDK automatically generates and assigns an app-instance identifier to each instance of your app. Analytics uses the ID to identify unique installations of your app and compute user metrics. Learn more about the app-instance ID.
By default, the SDK collects identifiers for mobile devices (for example, Android Advertising ID and Advertising Identifier for iOS) and uses technologies similar to cookies.
As for the issue, I assume this is a bug where even if you remove all your app bundle, the most recent app bundle is still retained (you would notice this when you try to upload the same app bundle again, an error would come out), but I could be wrong though. That said, I think it would be best to reach out to the Play Console help support. Alternatively, updating your declaration will remove the error.