Is there anyone who has successfully implemented AdMob?

edited August 2017 in Android Mode

Is there anyone who has successfully implemented AdMob?



  • edited August 2017

    @jeremydouglass what's the android:value=" " in the manifest? where can I find this value?

  • You should definitely join that thread and/or talk to akenaton about that -- I've actually never used it myself.

  • @fish=== i explained that in the thread given by @jeremydouglass

  • Thanks! @akenaton I was also wondering how to add a test device by ID, I've tried to add the line .addTestDevice("D******"); above the .build(); in the onCreate, but I get a type mismatch, does not match with

  • @fish===

    can you put the code you are no using??? - i am not sure about you have done...

  • edited August 2017
    import android.os.Looper;
    import android.os.Bundle;
    import android.view.Window;
    import android.widget.RelativeLayout;
    void setup() {
    void draw() {
      @ Override
      public void onCreate(Bundle savedInstanceState) {
      Window window = getActivity().getWindow();
       RelativeLayout adsLayout = new RelativeLayout(this.getActivity());
       RelativeLayout.LayoutParams lp2 = new RelativeLayout.LayoutParams(
          RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.MATCH_PARENT);  
      AdView adView = new AdView(this.getActivity());
          AdRequest newAdReq = new AdRequest.Builder()
  • edited August 2017
    **<?xml version="1.0" encoding="UTF-8"?>
    <manifest xmlns:ads="" xmlns:android="" android:versionCode="1" android:versionName="1.0" package="">
      <uses-sdk android:minSdkVersion="15" android:targetSdkVersion="15"/>
      <application android:debuggable="true" android:icon="@drawable/icon" android:label="">
        <activity android:name=".MainActivity" android:theme="@android:style/Theme.NoTitleBar">
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        <activity android:name=""/>
        <meta-data android:name="" android:value="8298000"/>
      <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
      <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
      <uses-permission android:name="android.permission.INTERNET"/>
      <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
  • @akenaton I have two problems, the first one is that, I get a banner that says"missing adactivity with android.configchanges in androidmanifest.xml" instead of the ads... and then secondly I wanted to add test ads by adding .addTestDevice("blahblah") line 40, but it didn't work :(

  • @fish===

    • your Manifest is missing the requested configchanges attributes; add this line:

    • why are you targetting only 15 ( i dont speak about the minSdk)???

    -what says the error log when adding .addTestDevice(AdRequest.DEVICE_ID_EMULATOR) line 40???

  • edited September 2017

    @akenaton Thanks, I have added the line that I missed and corrected the the target sdk(Thanks for pointing that out!)

    For the .addTestDevice(" your device id"), I realised that I was getting the error because I did not quote the ID "". Now there's no error,

    however when I test it, there is no ads that appear.. is that normal? do the ads only show if you get the app on the play store?

  • Use test Banner ID: ca-app-pub-3940256099942544/6300978111
    Interstitial ca-app-pub-3940256099942544/1033173712
    Rewarded Video ca-app-pub-3940256099942544/5224354917
    View details

  • It works! Thanks!

  • @akenaton but... the ads only show after the screen has been in sleep mode. They don't appear right away when you open the app

  • edited September 2017


    are you testing or working in (real) device mode?

    and try to add code in onResume();

  • yes it is on a real device

Sign In or Register to comment.