Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Remove Dependency Android Resolver (Android Advertising ID AAID)

Discussion in 'Android' started by ArnauKokoro, Apr 8, 2022.

  1. ArnauKokoro

    ArnauKokoro

    Joined:
    Apr 27, 2021
    Posts:
    45
    Hi,

    As a 1st April 2022 Google's permissions changes. AAID is not supported on Families Policies for children apps. So I have to remove every dependency which could use it from my app.

    I could add a meta tag on the Android's Manifest to disable Analytics for recollect AAID, but I think my main problem now is that firebase-unity library also installs this dependency: com.google.android.gms.play-services-ads-identifier which seems to be causing the caution message about using AdMob on Play Console and is related for my app to not being accepted by google reviewer because it uses AAID.

    My question here is: Is there a way to remove a single dependency from Android Resolver dependencies generated by the firebase-unity libraries installation?

    I tried to remove it from AndroidResolverDependencies.xml but every time I make a build it's recreated.

    Thanks!
     
  2. Jonas-Neuston

    Jonas-Neuston

    Joined:
    Jun 10, 2017
    Posts:
    70
    Our team is experiencing a similar issue.
     
  3. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,828
    I haven't tried this but would love to give a try.
    Are you planning to remove the library related files in the final executable?

    One option I see from top of my mind is to
    1. Add a script for post gradle processing
    2. Remove the dependency listed in the final build.gradle file
    3. Save it

    But, The final linking of the build may fail if the library is being used. You can check this by just clicking the aar file in unity and disabling it in the inspector too for android platform.
     
    Last edited: Apr 8, 2022
  4. ArnauKokoro

    ArnauKokoro

    Joined:
    Apr 27, 2021
    Posts:
    45
    Disabling AutoResolveOnBuild from External Dependency Resolver Settings I could prevent from recreating dependencies on AndroidResolverDependencies.xml. So far, I could remove com.google.android.gms.play-services-ads-identifier from AndroidResolverDependencies.xml and when building there is not this dependency on the gradle file, but Google still rejecting the app.

    I'm using these dependencies:

    implementation(name: 'com.google.android.datatransport.transport-api-3.0.0', ext:'aar')
    implementation(name: 'com.google.android.datatransport.transport-backend-cct-3.0.0', ext:'aar')
    implementation(name: 'com.google.android.datatransport.transport-runtime-3.0.0', ext:'aar')
    implementation(name: 'com.google.android.gms.play-services-auth-16.0.1', ext:'aar')
    implementation(name: 'com.google.android.gms.play-services-auth-api-phone-17.4.0', ext:'aar')
    implementation(name: 'com.google.android.gms.play-services-auth-base-16.0.0', ext:'aar')
    implementation(name: 'com.google.android.gms.play-services-base-17.6.0', ext:'aar')
    implementation(name: 'com.google.android.gms.play-services-basement-17.6.0', ext:'aar')
    implementation(name: 'com.google.android.gms.play-services-cloud-messaging-17.0.0', ext:'aar')
    implementation(name: 'com.google.android.gms.play-services-measurement-20.0.0', ext:'aar')
    implementation(name: 'com.google.android.gms.play-services-measurement-api-20.0.0', ext:'aar')
    implementation(name: 'com.google.android.gms.play-services-measurement-base-20.0.0', ext:'aar')
    implementation(name: 'com.google.android.gms.play-services-measurement-impl-20.0.0', ext:'aar')
    implementation(name: 'com.google.android.gms.play-services-measurement-sdk-20.0.0', ext:'aar')
    implementation(name: 'com.google.android.gms.play-services-measurement-sdk-api-20.0.0', ext:'aar')
    implementation(name: 'com.google.android.gms.play-services-safetynet-17.0.0', ext:'aar')
    implementation(name: 'com.google.android.gms.play-services-stats-17.0.0', ext:'aar')
    implementation(name: 'com.google.android.gms.play-services-tasks-17.2.1', ext:'aar')
    implementation(name: 'com.google.android.play.core-1.10.3', ext:'aar')
    implementation(name: 'com.google.firebase.firebase-abt-21.0.0', ext:'aar')
    implementation(name: 'com.google.firebase.firebase-analytics-20.0.0', ext:'aar')
    implementation(name: 'com.google.firebase.firebase-analytics-unity-8.8.0', ext:'aar')
    implementation(name: 'com.google.firebase.firebase-app-unity-8.8.0', ext:'aar')
    implementation(name: 'com.google.firebase.firebase-auth-21.0.1', ext:'aar')
    implementation(name: 'com.google.firebase.firebase-auth-interop-20.0.0', ext:'aar')
    implementation(name: 'com.google.firebase.firebase-auth-unity-8.8.0', ext:'aar')
    implementation(name: 'com.google.firebase.firebase-common-20.0.0', ext:'aar')
    implementation(name: 'com.google.firebase.firebase-components-17.0.0', ext:'aar')
    implementation(name: 'com.google.firebase.firebase-config-21.0.1', ext:'aar')
    implementation(name: 'com.google.firebase.firebase-config-unity-8.8.0', ext:'aar')
    implementation(name: 'com.google.firebase.firebase-datatransport-18.0.0', ext:'aar')
    implementation(name: 'com.google.firebase.firebase-encoders-json-18.0.0', ext:'aar')
    implementation(name: 'com.google.firebase.firebase-iid-21.1.0', ext:'aar')
    implementation(name: 'com.google.firebase.firebase-iid-interop-17.1.0', ext:'aar')
    implementation(name: 'com.google.firebase.firebase-measurement-connector-19.0.0', ext:'aar')
    implementation(name: 'com.google.firebase.firebase-messaging-23.0.0', ext:'aar')
    implementation(name: 'com.google.firebase.firebase-messaging-unity-8.8.0', ext:'aar')


    Someone knows if some of these could be using AAID?

    Many Thanks!
     
  5. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,828
    Check once the final build.gradle for the final dependencies.
    I see recently some plugins adding at the final step of android project building leading to lots of confusions and making debugging hard!

    You can see the build.gradle files under Temp/gradleOut folder (recent unity versions seems to save in a diff path i guess) and check build.gradle under launcher and unityLibrary folder for the final dependencies.
     
  6. ArnauKokoro

    ArnauKokoro

    Joined:
    Apr 27, 2021
    Posts:
    45
    These dependencies come from build.gradle under unityLibrary. There is no dependencies on build.gradle under launcher. I did check with android studio after exporting the project.

    Thanks!!
     
  7. ArnauKokoro

    ArnauKokoro

    Joined:
    Apr 27, 2021
    Posts:
    45
    I've got approved!! Google Systems where reading com.google.android.gms.play-services-ads-identifier on the proguard file because I had specifications for it. So I removed and got approved.
     
    elaine_unity694 likes this.
  8. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,828
    Ah! Thanks for sharing :)
     
  9. elaine_unity694

    elaine_unity694

    Joined:
    Oct 12, 2020
    Posts:
    26

    Hi, I don't have the proguard file, but may I know how you add meta tag on the AndroidResolverDependencies.xml ? is it manually add into the xml from Android Studio?
     
    Last edited: Aug 15, 2022
  10. ArnauKokoro

    ArnauKokoro

    Joined:
    Apr 27, 2021
    Posts:
    45
    If you disable AutoResolveOnBuild from External Dependency Resolver Settings, you can manually add and remove tags on AndroidResolverDependencies.xml. But if it is enabled the tags and dependencies are recreated automatically by Unity when building the app for Android.
     
    elaine_unity694 likes this.
  11. elaine_unity694

    elaine_unity694

    Joined:
    Oct 12, 2020
    Posts:
    26
    Thank you !