Update for the verified AdMob plugin possible?

9 posts, 1 answers
  1. Marc
    Marc avatar
    40 posts
    Member since:
    Oct 2013

    Posted 30 Oct 2015 Link to this post

    We are happily using the Telerik verified AdMob plugin fork of floatinghotpot's version for some time.

    A while ago, he declared this version of the plugin as deprecated and provided a much better version as "AdMob Pro" plugin. More information on this at the Github page of the old plugin:

    https://github.com/floatinghotpot/cordova-plugin-admob

    This is the new plugin:

    https://github.com/floatinghotpot/cordova-admob-pro

    Unfortunately, the new plugin does not build with AppBuilder. Would it be possible to provide a working (i.e. "verified") version from Telerik? That would be awesome. :)

    Regards and thanks in advance for a short notice regarding this,
    Roman

     ​

  2. Tsvetina
    Admin
    Tsvetina avatar
    1876 posts

    Posted 03 Nov 2015 Link to this post

    Hi Marc,

    Indeed, the verified plugin is still the older AdMob one. I forwarded your request to the team taking care of the verified plugins to consider adding the Pro version to the list and they will probably do so in the near future.

    I tried adding the AdMob Pro plugin as a custom plugin in AppBuilder and the project was built successfully on my side. Can you specify what platform are you building for and copy the build error, so we can take a look?

    Regards,
    Tsvetina
    Telerik
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
  3. Marc
    Marc avatar
    40 posts
    Member since:
    Oct 2013

    Posted 03 Nov 2015 Link to this post

    Hi Tsvetina,

    thanks a lot for considering the integration of the new version of the plugin.

    For me the new plugin is still failing during the cloud build with AppBuilder. Here is what I did:

    1. created a new project from the Kendo UI Tabstrip template
    2. imported the latest version of the AdMob Pro plugin as provided at github
    3. build for Android -> error

    The following error log is provided by AppBuilder:

    [2015-11-03 12:28:28.130] Log (Info,None): Project "admobpro-test.tmp.proj" (default targets):
        android Build Tooling revision 2015.09.30.2r
        Warning: BUILD FAILED
    /home/builder/android-sdk-linux/tools/ant/build.xml:577: ../../../../home/builder/android-sdk-linux/com.google.android.gms:play-services-ads:+ resolve to a path with no project.properties file for project /tmp/builds/hNnVh7tKCChIfpes5p/app

    Total time: 0 seconds
        Error: Build failed during execution
        Error: 'Build failed with error code 1'
    Done building project "admobpro-test.tmp.proj" -- FAILED.

  4. Tsvetina
    Admin
    Tsvetina avatar
    1876 posts

    Posted 05 Nov 2015 Link to this post

    Hi Marc,

    The difference between the projects from template and the ones in the plugin markeplace is the Cordova version. I changed the Cordova version of the template app to 4.0 and the build that was failing started completing sucessfully. 

    There is a discussion related to this problem in the plugin repo:
    Android build failed with error "com.google.android.gms:play-services-ads:+"

    Regards,
    Tsvetina
    Telerik
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
  5. Marc
    Marc avatar
    40 posts
    Member since:
    Oct 2013

    Posted 10 Nov 2015 Link to this post

    Hi Tsvetina,

     

    thank you very much for investigating the issue and providing the related github discussion.

     

    If I got it right, we would need to use a Cordova version which has a CLI >= 5 to be able to use the new AdMob plugin. This would be Cordova 4+. Unfortunately, Cordova 4 is marked as experimental in the AppBuilder.

    Is it save to use it for a production app anyway or should we wait?

    Thank you and best regards,
    Marc

  6. Marc
    Marc avatar
    40 posts
    Member since:
    Oct 2013

    Posted 11 Nov 2015 Link to this post

    Addendum to my post above: I just tried Cordova 4 + AdmobPro in our project. It builds with just the AdmobPro plugin, but it fails as soon as I add the PushPlugin from the Telerik marketplace, which is needed in our App:

    [2015-11-11 16:21:48.399] Log (Info,None): Project "fanfiktion.tmp.proj" (default targets):
        android Build Tooling revision 2015.11.03.5r
        Warning: Note: Some input files use or override a deprecated API.
        Warning: Note: Recompile with -Xlint:deprecation for details.
        Warning: Unknown source file : warning: string 'common_android_wear_notification_needs_update_text' has no default translation.
        Warning: Unknown source file : warning: string 'common_android_wear_update_text' has no default translation.
    Unknown source file : warning: string 'common_android_wear_update_title' has no default translation.
    Unknown source file : warning: string 'common_open_on_phone' has no default translation.
        Warning: Note: /home/builder/BpcTooling/Cordova3/Plugins/com.telerik.LiveSync/src/android/LiveSync-Lib/LiveSync-Lib/src/com/telerik/LiveSync/CloudSync.java uses or overrides a deprecated API.
        Warning: Note: Recompile with -Xlint:deprecation for details.
        Warning: Note: Some input files use or override a deprecated API.
        Warning: Note: Recompile with -Xlint:deprecation for details.
        Warning: Unknown source file : warning: string 'common_android_wear_notification_needs_update_text' has no default translation.
        Warning: Unknown source file : warning: string 'common_android_wear_update_text' has no default translation.
    Unknown source file : warning: string 'common_android_wear_update_title' has no default translation.
    Unknown source file : warning: string 'common_open_on_phone' has no default translation.
        Warning: Note: /home/builder/BpcTooling/Cordova3/Plugins/com.telerik.LiveSync/src/android/LiveSync-Lib/LiveSync-Lib/src/com/telerik/LiveSync/CloudSync.java uses or overrides a deprecated API.
        Warning: Note: Recompile with -Xlint:deprecation for details.
        Warning: FAILURE:
        Warning: Build failed with an exception.
        Warning: * What went wrong:
        Warning: Execution failed for task ':processArmv7DebugResources'.
        Warning: >
        Warning: Error: more than one library with package name 'com.google.android.gms'
        Warning: You can temporarily disable this error with android.enforceUniquePackageName=false
        Warning: However, this is temporary and will be enforced in 1.0
        Warning: * Try:
        Warning: Run with
        Warning: --stacktrace option to get the stack trace. Run with
        Warning: --info
        Warning: or --debug
        Warning: option to get more log output.
        Warning: /tmp/builds/csuoGZBUXRpOqNvTBo/app/cordova/node_modules/q/q.js:126
        Warning: throw e;
        Warning: ^
    Error code 1 for command: /tmp/builds/csuoGZBUXRpOqNvTBo/app/gradlew with args: cdvBuildDebug,-b,/tmp/builds/csuoGZBUXRpOqNvTBo/app/build.gradle,-Dorg.gradle.daemon=true,-PcdvBuildArch=armv7,-PcdvBuildMultipleApks=true
        Error: Build failed during execution
        Error: 'Build failed with error code 8'
    Done building project "fanfiktion.tmp.proj" -- FAILED.

  7. Answer
    Kaloyan
    Admin
    Kaloyan avatar
    872 posts

    Posted 13 Nov 2015 Link to this post

    Hello Marc,

    Thank you for getting back to us.

    Straight to your questions. The experimental tag against the Cordova 4.0.0 version in AppBuilder means that even as this version has passed our initial testing, certain issues could occur in it. In other words, we mark each new Cordova version as experimental on our side, as there is no way for us to cover everything with our automated and manual testing. Thus, we rely on our users to report issues in more specific scenarios, so that we can take immediate actions and fix them. This said, there should be nothing stopping you from publishing applications developed against experimental Cordova versions in the app stores.

    Further, the build failure you have came across is due to a jar mismatch between the Telerik Push Notifications and the AdMob Pro plugins. The library in fault is the google play services framework. You can see that, it is being used as a gradle dependency in the AdMob Pro plugin and in the same time, the Push Notifications plugin installs it from another place. The good news is that, this can be easily worked around in your scenario, by commenting the following line in the AdMob Pro's plugin.xml file:
    From:
            <!-- cordova CLI using gradle and it working well -->
            <framework src="com.google.android.gms:play-services-ads:+" />
    To:
            <!-- cordova CLI using gradle and it working well -->
            <!--<framework src="com.google.android.gms:play-services-ads:+" />-->

    The above will remove the play-services dependency from the AdMob Pro plugin and your project will build for the Android platform again, as long as the Push Plugin is installed in it. In other words, you will refer the play-services framework only once and this will be done by the Push Notifications plugin. It is important to say however, that if you remove the Push Notifications plugin from your project, the build will fail again and in order to fix it, you will need to uncomment the above line in the AdMob Pro plugin.

    Additionally, this will also allow you to stick to Cordova 3.7 or 3.8 in your AppBuilder project, as the gradle dependency will no longer be present.

    I hope this helps. Please, let me know if you will require further assistance.

    Regards,
    Kaloyan
    Telerik
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
  8. Marc
    Marc avatar
    40 posts
    Member since:
    Oct 2013

    Posted 26 Nov 2015 in reply to Kaloyan Link to this post

    Hi Kaloyan,

    thank you very much for your detailed help. With it we were able to compose a working combination of plugins with Cordova 4.

    The Admob plugin is still very unreliable tho and doesn't work very well on several device (heavy interference with soft keyboard etc.). But that's not Telerik's fault of course. We are already investigating different technologies for platform independent mobile development to be able to get away from the Cordova/plugin mess. The Telerik guys from Nativescript are very helpful regarding this. ;)

    Thanks again for your help, it allowed us to deliver a mostly working Kendo solution at least for now.

  9. Kaloyan
    Admin
    Kaloyan avatar
    872 posts

    Posted 01 Dec 2015 Link to this post

    Hi Marc,

    I am happy to hear that my suggestion has helped.

    Further, I am also glad to know that you are evaluating our native approach as well.

    As for the Cordova plugins mess, we are currently trying to improve the experience there and as a matter of fact, with the latest AppBuilder release, we introduced Gradle build for earlier Cordova versions (3.7 and 3.8), so that we can fix the known issues across our verified plugins. The final goal is to fix all the known issues with mismatched dependencies by the end of the year.

    Please, let me know if you will require further assistance.

    Regards,
    Kaloyan
    Telerik
     

    Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

     
Back to Top