Reputation: 147
I've been going round in circles here, trying to get the Admob Pro plugin to work. I get endless build errors. If anyone has recently got Admob ads working in their Cordova project (using any plugin) I'd be grateful for the exact steps I need to follow to do that. I don't mind which plugin. I say recently because I imagine a lot depends on the particular version numbers all working with each other. I've been using:
Many thanks
Upvotes: 1
Views: 185
Reputation: 750
To target api 28 you'll need cordova-Android 8 or later and cordova as well. I was using vs community 2015 but decided to use this as an opportunity to migrate to using VsCode which I find a much less opaque since everything is done from the command line. I had to upgrade Cordova to 8.1.1. You also need to be aware of GDPR consent, and of the upcoming CCPA changes. I use the following plugins:
https://github.com/Longs/cordova-plugin-ad-admob.git NB I haven't uploaded the additional functionality to pass in GDPR consent yet and this is Android only in any case.
https://github.com/dragonbane0/cordova-plugin-google-consent.git NB this is incompatible with Cordova 9 so I use it with Cordova 8.1
"cordova-plugin-extras-google-play-services": "^1.0.5"
"cordova-plugin-ad-admob-sdk": "^1.0.1"
From memory I believe that one or more of the plugins generated an issue with the new AndroidX versions so I needed to add:
"cordova-plugin-androidx": "^1.0.2", "cordova-plugin-androidx-adapter": "^1.1.0",
Upvotes: 0