How To Add Ads and Display


Ade Wale

Hi David,

How can I add ads at the bottom app designed with AppBuilder?

Thanks


DecSoft

Hello Ade,

Take a look at the "AdMob" app sample. Here we use the "AdMobShowBanner" action from the AdMob plugin. Such action have a "position" argument, which can be one of these values: "BOTTOM_LEFT", "BOTTOM_CENTER", "BOTTOM_RIGHT", between others. You can take a look at the plugins' manager (program's options dialog) in order to read the AdMob plugin help.



Ade Wale
Hello Ade,

Take a look at the "AdMob" app sample. Here we use the "AdMobShowBanner" action from the AdMob plugin. Such action have a "position" argument, which can be one of these values: "BOTTOM_LEFT", "BOTTOM_CENTER", "BOTTOM_RIGHT", between others. You can take a look at the plugins' manager (program's options dialog) in order to read the AdMob plugin help.

Hi David,

Thanks. I have gone through the AdMob sample but the sample display as Lightbox message, which is not what I want.

I want it to be able to display ads inside form like this

Thanks


DecSoft

Hello Ade,

Sorry, but, I can't understand what you mean by "the sample display as Lightbox message". I think the bottom banner shows like the above image. Can you provide a capture of the sample with bottom ads inside and explain a little more the issue?

Here is a capture of the AdMob sample running in my phone:



Ade Wale

Hi,

This is what I got, although the Admob plugin is copied and explore to be installed from AdMob.ab folder


DecSoft

Hello Ade,

The AdMob plugin is only available when the application is build with Apache Cordova.



Ade Wale
Hello Ade,

The AdMob plugin is only available when the application is build with Apache Cordova.

Hi David,

I have been pulling my hair since two days ago without successful in getting ad banner to display like yours.

Is this demo sample inside AB?

What could be issue?


DecSoft

Hello Ade,

Yes; the AdMob demo is included by App Builder. In fact is the first in the list! And they are ready to be build with Apache Cordova, that is, all the app's options are "checked" to do that, since the AdMob only works once our application has been build with Apache Cordova. So, in principle, you are ready to build the application and try it in your own phone...



Ade Wale
Hello Ade,

Yes; the AdMob demo is included by App Builder. In fact is the first in the list! And they are ready to be build with Apache Cordova, that is, all the app's options are "checked" to do that, since the AdMob only works once our application has been build with Apache Cordova. So, in principle, you are ready to build the application and try it in your own phone...

Hi David,

That;s what I was playing with, even I added custom admob plugin but this is what I got


DecSoft

Hello Ade,

In your case the first thing I try is to upgrade Cordova to the latest version.

Open a console window and write this:

npm update -g cordova

Then delete the "_Compiled" directory and try again Ade.



Ade Wale

Hi David,

I have update the Cordova to version 5.6.

Now, the issue is nothing happened over One hour:


Ade Wale

Hi David,
At last. I got it working.


DecSoft

Hello,

Maybe some temporary problems in the plugin's server. Glad to know you got it Ade.



Ade Wale

Hi David,

Ok, maybe server issue.

Another issue I want to the ads to show at the bottom of the app and I have below code on Form at event SHOW:

AdMobShowBanner "ca-app-pub-xxxxxxxx" "BOTTOM_CENTER" "SMART_BANNER" "true"

So that whenever the app is open the ads will display like yours without clicking show banner button.

But the ads is not display at the bottom, what am I doing wrong?


DecSoft

Hello Ade,

Are the ads show in other place than the bottom one? Are you use at the "AdMobFailEvent" event to get possible error information? And what for other events?



Ade Wale
Hello Ade,

Are the ads show in other place than the bottom one? Are you use at the "AdMobFailEvent" event to get possible error information? And what for other events?

Yes, the ads show at the bottom if I click show banner button.

No, I used AdMobShowBanner and AdMobLoadedEvent for Form at SHOW.


DecSoft

Hello Ade,

You must use at least some of the events that the plugin provides, since such events inform us about possible errors, success, "leaves" (when the user tap the banner), etc. On the other hand, I suggest you these possible approach:

1º Try with the "Show" event, but, after call "AdMobShowBanner" use also the "ApplyModel" action.

2º Use another possible event like an app's view "Click" event if the "Show" event continue causing problems.

Please, tell me about your progress Ade.



Ade Wale
Hello Ade,

You must use at least some of the events that the plugin provides, since such events inform us about possible errors, success, "leaves" (when the user tap the banner), etc. On the other hand, I suggest you these possible approach:

1º Try with the "Show" event, but, after call "AdMobShowBanner" use also the "ApplyModel" action.

2º Use another possible event like an app's view "Click" event if the "Show" event continue causing problems.

Please, tell me about your progress Ade.

Hi David,

I will let you know my outcome, Click event is not needed because I just want to admob load automatically without clicking any button when app load.


DecSoft

Hello,

Click can be a workaround Ade. Anyway, please, try with the "Ready" app event instead of the app's view's "Show" event. By my mistake I suggest you the "Show" event before, but this cannot be used, since they are fired before the "Ready" app's event, something needed to work with this Cordova's plugin. I am now preparing a sample which use the "Ready" event. Later I tell you what happend Ade.



DecSoft

Hello again,

Ok. Just use the app's "Ready" event. I just try it and they works like expected, that is, shows the banner when the application starts.



Ade Wale

Hi David,
Thanks the Ready event work as expected.

Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.

Este sitio utiliza "cookies" útiles para almacenar sus preferencias.

Bien. Ocultar esta nota. Obtener más información.