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
Ads are not shown #645
Comments
Your code is very generic, so that's difficult to help from here. Be sure you set the flag for "testing ads" and use those test #ID's provided by Google (never test with your real credentials). |
If you take a closer look to the code I am using the ID you listed there for the Banner. I still do not know why the code is not working.
I am just copying and pasting the information from the website into a script. Is that supposed to be like that? |
I can't help, but the plug-in itself works perfect, that's for sure.
It's one of the best in the whole Admob / Cordova environment.
You can start by debugging and outputting the results to your console or a log file and share it here.
Also start with a complete new, clean project, e.g. the one on this .git repo, as a bootstrap.
|
You mean the example at: https://github.com/admob-plus/admob-plus/tree/master/examples/cordova ? |
Yes.
Always start with this boilerplate and then add your own plugins and code afterwards, so you can see at what point things go wrong.
Also shared your development environment here, like it's Windows, Apple, a browser, emulator, etc...
|
When I download that example, I create a folder, let's name it: "Project" and then I copy the cordova folder provided.
That's why I tried to created from scratch, trying to load the ads over the cordova empty project that it is created when you type: |
Sounds like there's something really wrong with the core set-up of your development environment. Better fix that first. Start with a complete new, clean Cordova project, the "hello world" example provided when you start from scratch. Create that, compile that, run that (on a real world Android device or iPhone). Then try to add an easy plugin like a Cordova / Apache one (device info, or something like that). See if that work, if you can fetch some "device info" from your app, using the plugin, etc... Than step by step, scale up to this AdMob plugin; this plugin is not for starters, it's not "easy out of the box" and unless you have at least 10.000 active user-sessions a month, you will earn nothing. |
I checked once more the initial code I made, after adding:
In the config.xml file, inside the widget tag. I noticed that the banner blinks and goes away. Maybe is there something on my code telling the banner to appear and disappear? Record_2024-01-06-08-26-29.mp4 |
As I checked, there is an issue with the latest version of this plugin, which is working on iOS but not on Android. So, use admob-plus-cordova@1.28.0 for Android, as it is working perfectly. Also, use the latest plugin for iOS, as using an older plugin on iOS may result in a version dependency issue. |
You should remove this part: |
i think i found the problem... you need to add: |
Ads are not showing using this plugin. Let me describe the steps I followed from scratch, maybe you can assist me.
First, I created a new cordova project:
cordova create AdmobProject
cd AdmobProject
Then, I add the plugin
cordova plugin add admob-plus-cordova --save --variable APP_ID_ANDROID=ca-app-pub-3940256099942544~3347511713
I got this ID from Google website. Then, I modify the index.html inside AdmobProject/www folder. I leave it like this:
And now I follow the instructions from plugin website and add the instructions for the banner. The index.html file is now:
I entered the test unitAdId provided by plugin website.
When I add android platform and build using cordova, the app does not display anything at all.
Suggestions about how to fix this, please?
The text was updated successfully, but these errors were encountered: