Page 5 of 6
AdMob ads to Appery app!?
Posted: Mon May 12, 2014 10:13 pm
by Alena Prykhodko
Hello,
Try to invoke this code on button click event:
pre
var successCreateBannerView = function() { alert("addBanner Success");
window.admob.requestAd({'isTesting': true},success,error); };
var success = function() { alert("requestAd Success"); };
var error = function(message) { alert("Oopsie! " + message); };
Code: Select all
var options = {
'publisherId': 'xxxxxxxxxxxxxxx',
'adSize': 'BANNER'
};
window.admob.createBannerView(options,successCreateBannerView,error);
/pre
AdMob ads to Appery app!?
Posted: Tue May 13, 2014 9:41 am
by antonback89
Thanks for the answer!
unfortunately no banner is showing =/
I have a Button in the footer and have "Button Click Run javascript" and then your code but thats not working
And then i tried "Button Click Invoke Service" but then my apps crash everytime =/
Any idea?'Thanks again!
AdMob ads to Appery app!?
Posted: Tue May 13, 2014 4:14 pm
by Evgene Karachevtsev
Hello Anton,
Did you test your project on a device? You should export your app as .apk file and install on the device
AdMob ads to Appery app!?
Posted: Tue May 13, 2014 4:51 pm
by antonback89
Hey
Yes i always Do that but still no luck x(
AdMob ads to Appery app!?
Posted: Tue May 13, 2014 5:33 pm
by Evgene Karachevtsev
You can use Weinre for remote debugging: http://docs.appery.io/documentation/d...
AdMob ads to Appery app!?
Posted: Thu May 15, 2014 3:04 pm
by antonback89
I tried that aswell, but no errors appears. =S
Really don't understand what its about!
AdMob ads to Appery app!?
Posted: Thu May 15, 2014 4:08 pm
by Evgene Karachevtsev
Hello Anton,
Have you restored your app? I don't see any button with admob methods invocation. Is its name "Ven i rummet"?
AdMob ads to Appery app!?
Posted: Thu May 15, 2014 4:19 pm
by antonback89
Hey!
Yes, because i needed to download a working .apk-file today.
I need to publish it tomorrow, so i didn't have the time to try right now.
But i'll going to put in my "old" code and so and keep trying with the ads and see if i can get the ads to work.
Yes thats the name of the app!
AdMob ads to Appery app!?
Posted: Thu May 15, 2014 4:29 pm
by Evgene Karachevtsev
Then please contact us with the update.
AdMob ads to Appery app!?
Posted: Wed Jun 18, 2014 2:48 pm
by HairulKhafiz
Hi, I followed the javascript above and finally able to invoke the javascript.
However, it is displaying "You mus have Adactivity declared in AndroidManifest.xml with configChanges" in the Admob footer adspace.
I have tried several ways as suggested in other forums to add the adactivity but there is a compilation error.
Any way to help?
Thanks