How do you add AdMob advertising functionality to your dukescript generated android project?
Let's say for example that I addeded android to the Hello World example and that the app is already published so I can add some ad unit
s trough admob site, for example Ad unit ID ca-app-pub-99999999999999999/9999999999
for an interstitial and Ad unit ID ca-app-pub-9999999999999999/9999999998
for banner.
As far as I know you can't show them with javascript only, you should add some jars to the libraries folders and call explicitly some of their functions.
You need to add the required libraries. There's a related question how to install them to your local repository here.
After you installed the libraries and reference them in your android project, you should be able to use AdMob. Follow the description here to wrap the DukeScript MainActivity in your own MainActivity. Then you should be able to create ads in the onCreate method as described here.
If you've finished that, modify your pom.xml to include not only the jar, but also the apklib of google play services:
You wil also need to modify your AndroidManifest.xml and add some permissions and an activity. Here's the code for your app:
That's it, you should now be able to display an ad. It works for me with the application you sent me.