Problems with Admob

About Monkey 2 Forums Monkey 2 Programming Help Problems with Admob

Tagged: ,

This topic contains 7 replies, has 4 voices, and was last updated by  Mark Sibly 2 weeks ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #15609

    Nalle
    Participant

    Hello everyone,

    I used to get the ads working with Admob module, but not anymore, after “com.google.android.gms:play-services-ads:17.1.1”.

    I suppose something is changed.

    After eveyting else failed, I tried to build the Admob banana example. I managed to do that in Android Studio without errors, but it also crashes, when I try to start the app.

    Could someone show sample AndroidManifest.xml file one could use with Monkey 2 with ads?

    I have made these little lines in Android Studio:

    Build.gradle (Project):

    Build.gradle (Module):

    In the Monkey2 app:

    And I have implemented the methods for Reward ads.

    What else I should take into consideration?

    #15616

    Nalle
    Participant

    Anyone? No-one?

    #15617

    Ethernaut
    Participant

    Sorry, haven’t tried mobile at all yet. Hopefully someone who has can reply.

    #15634

    Nalle
    Participant

    I have added RelativeLayout to my Android project (layout.xml) just like the instructions say in Google’s Admob page:

    Also metadata to Android manifest file:

    Still not working. Though I’m not sure about that RelativeLayout in Monkey 2 projects…

    Is there anyone here who has working ad code with “com.google.android.gms:play-services-ads:17.1.1”?

    #15635

    SekaiChi
    Participant

    Isn’t version different? What if you use version 16.0.0?

    #15636

    Nalle
    Participant

    With version 16.0.0 the ads are working perfectly. I thought that 17.0.0 was oldest available after 17.1.1. Anyway 15.0.1 that I’ve used earlier isn’t available anymore. Thanks!

    We should get ready for the time, when ads library that’s available is 17.0.0 or later.

    But your reply saved my day! Thanks again.

    Nice to see that Monkey 2 community is alive. 🙂

    #15638

    Mark Sibly
    Keymaster

    Will take a look at this ASAP, thanks for bringing it to my attention.

    #15640

    Mark Sibly
    Keymaster

    For 17.1.1 you need to add this to your manifest inside the <application> block:

    <meta-data android:name=”com.google.android.gms.ads.APPLICATION_ID”
    android:value=”ca-app-pub-3940256099942544~3347511713″/>

    I also had to tweak the java code a bit (results are in develop branch), I’m surprised you could even build it.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.