BranchMetrics / capacitor-branch-deep-links

Capacitor plugin for branch.io deep links
MIT License
33 stars 43 forks source link

Problems with play-services-ads version #111

Closed sverdlov closed 10 months ago

sverdlov commented 11 months ago

Describe the bug

Not long time ago Google Play started to show message about play-services-ads and play-services-ads-lite versions sunset This version is scheduled to sunset on June 30th 2023. See https://developers.google.com/admob/android/deprecation for more information. In documentation version 19.4.0 is specified. I've tried update it to latest but app is crashing with error

******************
* The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers    *
* should follow the instructions here:                                       *
* https://googlemobileadssdk.page.link/admob-android-update-manifest         *
* to add a valid App ID inside the AndroidManifest.                          *
* Google Ad Manager publishers should follow instructions here:              *
* https://googlemobileadssdk.page.link/ad-manager-android-update-manifest.   *
******************

I see that I have to add AdMob app ID, but I'm not sure what it is, where I shoult get it and does it requred at all.

Steps to reproduce

  1. Update com.google.android.gms:play-services-ads:19.4.0 to the latest version

Expected behavior

-

SDK Version

5.0.0

Make and Model

Xiaomi 10T Pro

OS

Android

Additional Information/Context

No response

avisiboni commented 11 months ago

Same issue here, any update?

gdeluna-branch commented 11 months ago

We'll bump the version and publish an update soon.

gdeluna-branch commented 11 months ago

I tested with implementation("com.google.android.gms:play-services-ads-identifier:18.0.1") and it succeeded. @avisiboni @sverdlov can you confirm if that version works for you? We'll update the docs to reflect if so.

It'll be a code change otherwise to get the latest supported.

sverdlov commented 11 months ago

@gdeluna-branch that's strange because it's also should be deprecated. I think version should be upgraged not downgraded. And at least for 21, because 20 is already deprecated

gdeluna-branch commented 11 months ago

Thanks for pointing out the timeline. Unsure why my environment shows no warning. I'll post back when we've made the changes.

gdeluna-branch commented 10 months ago

I think there was some confusion as to which library is getting deprecated.

Our native android sdk documentation correctly suggests implementation "com.google.android.gms:play-services-ads-identifier:18.0.1"

However our capacitor sdk doc incorrectly says implementation 'com.google.android.gms:play-services-ads:19.4.0' // GAID matching

The library we require for GAID is https://mvnrepository.com/artifact/com.google.android.gms/play-services-ads-identifier?repo=google

The latest being 18.0.1.

Warning with ads:19.4.0

image

No warning with ads-identifier:18.0.1

image

Please let me know if importing com.google.android.gms:play-services-ads-identifier:18.0.1 works for you. We'll update the doc.

If you don't need this identifier, it's sufficient to omit the import.

sverdlov commented 10 months ago

@gdeluna-branch yes, you are right, I confused libs. Seems like with com.google.android.gms:play-services-ads-identifier:18.0.1 all works great. Thank you.