Admob ads not working in Cordova since last C2 update

  • Hi there,

    I´ve been using Ultimate Ads plugin and cocoon admob ads plugin in order to add admob rewarded videos to my C2 game exported to Cordova.

    Everything used to work fine until I updated the Construct 2 version to the r265 (latest one so far).

    Now it is like cordova ignores C2 functions to access admob. However, no changes were madde to plugin settings,nor the C2 game code. I am using Cordova CLI to build it.

    I´ve made many attempts, including a small capx to test this, but still not working.

    You can find the capx attached.

    I know it is a third party plugin, but it may be causing other troubles and think it is a matter os C2 as it started right after latest release.

    Thank you guys, you can find sample capx here: aprendia.net/jalumar/admobtest.capx

    Gabriel

  • this is the plugins developer reply change the code like below it will work

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you very much for your reply, i was using version 1.0.12 and used to work fine (version 2.0 showed a black screen) but now it doesn't. Will try with this 1.0.0 spec and revert c2 version too and get back here to let you know.

  • Iftikhar555 I´ve tried with this specification, like Ludei says, but it still fails when trying to show a rewarded video ad. It´s weird cause it used to show it fine some days ago, without any changes from my side, except updating C2 engine.

    I´ve reverted C2 version to r262, but still same issue happening.

    Any ideas are welcome!!!

  • Finally I could make the sample project work by reverting to r262 and cleaning, uninstalling and reinstalling android.

    I tried to add the plugins of the big game again one by one, and see that problem comes when adding the cordova-plugin-play-games-services. There must be a dependency conflict in there.

    I tried to add cocoon GPS plugin but it also doesn´t work. It may be a compatibility problem with the cocoom admob spec. 1.0.0. cocoon-google-play-services version by default is 2.0.0, do you guys know if that version is stable?

  • Hi there! After a deep research, I found the problems.

    There a mixture of a problem with r265 of Construct 2, and a compatibility problem between plugins.

    These are the steps I followed to make it work again, and make admob and google play services to work fine together:

    1) Reverted Construct to r262

    2) Installed cocoon-plugin-ads-android-admob version 1.0.12

    3) Removed cordova-plugin-play-games-services

    4) Installed cocoon-plugin-social-android-googleplaygames version 1.1.5

    Cleaned project in cordova cli, removed android and added android again, and now it works :)

  • gberenst Does this still work for you? I've had a lot of things breaking lately.

  • Yes, after passing that struggle it is working fine now.

  • I'm using ultimate ads and I have exported with phonegap, and the ads work but when I put the apk on google play the ads are no longer displayed do you know why?

  • I'm using ultimate ads and I have exported with phonegap, and the ads work but when I put the apk on google play the ads are no longer displayed do you know why?

    from what i heard its a general problem. i have many friends have the same problem and they using android studio not construct 2. i think google always in this period of time they make changes and updates

  • Yes, after passing that struggle it is working fine now.

    can you explain more please ? and how you add cocoon plugin to cordova cli ? and how to implement code to construct 2 any capx ? because i use enhance but it add more than 10 mb to the project and that effect the apk

  • I have explained all the steps i followed to make it work in the post above. To install the plugin in cordova CLI just go to the project folder and type cordova plugin add 21.0.1sxn@bomda-diordna-sda-nigulp-noococ

    So you ensure that version is installed. For c2 you must buy the ultimate ads plugin fron scirra store and you setup your admob ids in the properties window, and use the show ad events wherever you want in your project.

  • I have explained all the steps i followed to make it work in the post above. To install the plugin in cordova CLI just go to the project folder and type cordova plugin add 21.0.1ifi@bomda-diordna-sda-nigulp-noococ

    So you ensure that version is installed. For c2 you must buy the ultimate ads plugin fron scirra store and you setup your admob ids in the properties window, and use the show ad events wherever you want in your project.

    thank you gberenst . i have another questions. from your experience . all things work fine in construct 3 ( ads, gdpr etc ... ) ? and it have a feature as an engine of making games?

  • Yes! I use both of them (c2/c3)for different projects and those features work fine on both if you find the right plugin combinations on cordova. The only issue is the performance on some devices with not much RAM.

    I have some trouble making Google FCM and Facebook plugin to work, but the rest of integrations were easier to make

  • I'm using ultimate ads and I have exported with phonegap, and the ads work but when I put the apk on google play the ads are no longer displayed do you know why?

    Did you change the test mode to false before publishing?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)