Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

AdMob ads to Appery app!?

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

antonback89
Posts: 0
Joined: Mon Apr 14, 2014 7:17 pm

AdMob ads to Appery app!?

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!

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

AdMob ads to Appery app!?

Hello Anton,

Did you test your project on a device? You should export your app as .apk file and install on the device

antonback89
Posts: 0
Joined: Mon Apr 14, 2014 7:17 pm

AdMob ads to Appery app!?

Hey
Yes i always Do that but still no luck x(

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

AdMob ads to Appery app!?

You can use Weinre for remote debugging: http://docs.appery.io/documentation/d...

antonback89
Posts: 0
Joined: Mon Apr 14, 2014 7:17 pm

AdMob ads to Appery app!?

I tried that aswell, but no errors appears. =S
Really don't understand what its about!

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

AdMob ads to Appery app!?

Hello Anton,

Have you restored your app? I don't see any button with admob methods invocation. Is its name "Ven i rummet"?

antonback89
Posts: 0
Joined: Mon Apr 14, 2014 7:17 pm

AdMob ads to Appery app!?

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!

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

AdMob ads to Appery app!?

Then please contact us with the update.

HairulKhafiz
Posts: 0
Joined: Wed Jun 18, 2014 2:48 pm

AdMob ads to Appery app!?

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

Image

Return to “Issues”