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

AdMob ads to Appery app!?

Did you have a chance to look at it? =)

Thanks!

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

AdMob ads to Appery app!?

Hello!

Working on it at the moment. I will update.

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

AdMob ads to Appery app!?

Wow! thank you so much!
Fantastic support once again =)

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

AdMob ads to Appery app!?

Sorry for delay, but developsers have problem with resolving this issue. Someone will get back to you with update.

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

AdMob ads to Appery app!?

Hows ut going?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

AdMob ads to Appery app!?

Hi Anton,

You can try, but it's not so easy.

  1. Create hierarchy and upload file AdMobPlugin.js
    http://www.screencast.com/t/V4x0VEQ0
    replace last line of code with this:
    pre
    if (typeof module != 'undefined' && module.exports) {
    module.exports = admob;
    }
    /pre
    http://www.screencast.com/t/ZG0floH9zCY

  2. Create hierarchy and upload file AdMobPlugin.java
    http://www.screencast.com/t/he0LwnPO6IDV

  3. Edit config.xml
    http://www.screencast.com/t/nBqZMaG5czcP

  4. Edit cardova_plugin.js
    http://www.screencast.com/t/agra2wII

  5. Create hierarchy and upload admob-6.4.1.jar
    http://dl.google.com/googleadmobadssd...
    unzip, find GoogleAdMobAdsSdk-6.4.1.jar, rename admob-6.4.1.jar and upload to project
    http://www.screencast.com/t/NYa7SNzG4tfQ

    6.Create text file admob-6.4.1.pom
    with this content:
    precode
    <?xml version="1&#46;0" encoding="UTF-8"?>
    <project xsi:schemaLocation="http:&#47;&#47;maven&#46;apache&#46;org/POM/4&#46;0&#46;0 http:&#47;&#47;maven&#46;apache&#46;org/xsd/maven-4&#46;0&#46;0&#46;xsd" xmlns="http:&#47;&#47;maven&#46;apache&#46;org/POM/4&#46;0&#46;0"
    xmlns:xsi="http:&#47;&#47;www&#46;w3&#46;org/2001/XMLSchema-instance">
    <modelVersion>4&#46;0&#46;0</modelVersion>
    <groupId>com&#46;google&#46;ads</groupId>
    <artifactId>admob</artifactId>
    <version>6&#46;4&#46;1</version>
    <description>POM was created from install:install-file</description>
    </project>
    /code/pre
    and upload to project.

  6. Add dependency to pom.xml
    precode
    <dependency>
    <groupId>com&#46;google&#46;ads</groupId>
    <artifactId>admob</artifactId>
    <version>6&#46;4&#46;1</version>
    </dependency>
    /code/pre
    http://www.screencast.com/t/YgQwXNCZLcPp
    Now object admob is available as window.admob

Angelo Martella
Posts: 0
Joined: Wed Mar 26, 2014 12:32 pm

AdMob ads to Appery app!?

Finally a clear guide of how to add admob plugin in a project appery. Excellent.

I run everything very carefully. I have not quite figured out yet how to invoke the new project using the plugin configured.
I added an event on the "Load" of the home page with the execution of a javascript with the following content.

window.admob.createBannerView (
{
'PublisherID': '[xxxxxxxxxxxxxx]',
'AdSize': admob.AD_SIZE.BANNER
},
successCallback,
failureCallback
);

When I go to the test page does not load.

Thanks for the valuable support

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

AdMob ads to Appery app!?

Hello Angelo,

Are there any errors in console? Please provide us them

Angelo Martella
Posts: 0
Joined: Wed Mar 26, 2014 12:32 pm

AdMob ads to Appery app!?

In the console there is this error:

Uncaught TypeError: Can not read property 'createBannerView' of undefined StartScreen.js: 243
event.returnValue is deprecated. Please use the standard event.preventDefault () instead

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

AdMob ads to Appery app!?

Hello Angelo,
You should test your app on mobile device and don't use event "load".

Return to “Issues”