Tag Archives: admob

1,317 views

InterstitialAd Admob not visible

// on bottom of onCreate add listener mInterstitialAd .setAdListener(new AdListener(){ public void onAdLoaded(){ interstitial.show(); } });   } // end onCreate   public void displayInterstitial (){ if (mInterstitialAd.isLoaded()) { mInterstitialAd.show(); } }

Posted in Android Studio, Bugs, warnings, errors | Tagged | Comments Off on InterstitialAd Admob not visible
1,884 views

Set theme of AdActivity to @android:style/Theme.Translucent

AndroidManifest.xml <activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" android:theme="@android:style/Theme.Translucent" />

Posted in Android Examples Code, Bugs, warnings, errors, Eclipse | Tagged , , | Comments Off on Set theme of AdActivity to @android:style/Theme.Translucent
2,451 views

Admob ad not visible on Android Emulator

Try this solution: AdView adView = new AdView(getApplicationContext());//in menu inflater getActivity() adView.setAdUnitId("ca-app-pub-87***yourNumber"); adView.setAdSize(AdSize.BANNER); LinearLayout linLay = (LinearLayout)findViewById(R.id.idReklamaLayout); // Add the adView to it linLay.addView(adView); // Initiate a generic request to load it with an ad if(Build.MANUFACTURER.equals("unknown")) { // Emulator AdRequest.Builder.addTestDevice("B3EEABB8EE11C2BE770B684D95219ECB"); … Continue reading

Posted in Android Examples Code, Bugs, warnings, errors, Eclipse | Tagged , , | Comments Off on Admob ad not visible on Android Emulator
2,554 views

Ad baner without GoogleAdMobAdsSdkAndroid-6.4.1 Android example

First: AdView is in XML file <com.google.android.gms.ads.AdView xmlns:ads="http://schemas.android.com/apk/res-auto" android:id="@+id/adView" android:layout_width="match_parent" android:layout_height="wrap_content" ads:adUnitId="MY_AD_UNIT_ID" ads:adSize="BANNER"/>   // onResume AdView adView = (AdView)this.findViewById(R.id.adView); AdRequest adRequest = new AdRequest.Builder() .addTestDevice(AdRequest.DEVICE_ID_EMULATOR) .addTestDevice("TEST_DEVICE_ID") .build(); adView.loadAd(adRequest); Second: Using AdView in Fragment with LinearLayout Resolve error in ADT … Continue reading

Posted in Android Examples Code | Tagged , , , | Comments Off on Ad baner without GoogleAdMobAdsSdkAndroid-6.4.1 Android example
2,287 views

setTesting(boolean) from the type AdRequest is deprecated

Admob testing on emulator issue. Android Eclipse code warning: setTesting(boolean) from the type AdRequest is deprecated Solution: adRequest.addTestDevice(AdRequest.TEST_EMULATOR); AdView adView = new AdView(this, AdSize.BANNER, "a14d9……….");//MY_AD_UNIT_ID AdRequest adRequest = new AdRequest(); adRequest.setTesting(true); // deprecated   adRequest.addTestDevice(AdRequest.TEST_EMULATOR); // OK adView.loadAd(adRequest);

Posted in Android Examples Code | Tagged , , | Comments Off on setTesting(boolean) from the type AdRequest is deprecated
2,051 views

Admob ads not visible on emulator Android 4.1

If you using GoogleAdMobAdsSdk-4.0.4.jar in your project and set android:targetSdkVersion=”17″ in AndroidManifest.xml , ads will not visible on emulator with Android 4.0.3 or 4.1. You have to set as android:targetSdkVersion=”17″ <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="17" /> Update project.properties file – row with … Continue reading

Posted in Android Examples Code, Bugs, warnings, errors, Eclipse | Tagged , , | Comments Off on Admob ads not visible on emulator Android 4.1
3,084 views

AdMob in Android 4 version

AdMob in Android emulator not visible? You have to using some from this libraries: GoogleAdMobAdsSdk-4.3.1.jar GoogleAdMobAdsSdk-6.0.1.jar GoogleAdMobAdsSdk-6.2.1.jar AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="cz.okhelp.admob" android:versionCode="1" android:versionName="1.0" >   <uses-sdk android:minSdkVersion="13" android:targetSdkVersion="16"/>   <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />     … Continue reading

Posted in Android Examples Code | Tagged | Comments Off on AdMob in Android 4 version
4,012 views

configChanges value of the com.google.ads.AdActivity must include

Errors: E/Ads(333): The android:configChanges value of the com.google.ads.AdActivity must include screenLayout. E/Ads(333): The android:configChanges value of the com.google.ads.AdActivity must include uiMode. E/Ads(333): The android:configChanges value of the com.google.ads.AdActivity must include screenSize. E/Ads(333): The android:configChanges value of the com.google.ads.AdActivity must include … Continue reading

Posted in Android Examples Code, Bugs, warnings, errors, Eclipse | Tagged , | Comments Off on configChanges value of the com.google.ads.AdActivity must include
8,872 views

NoClassDefFoundError: com.google.ads.AdView ADT 17

Eclipse update ADT 17 Android Emulator error: E/AndroidRuntime(370): java.lang.NoClassDefFoundError: com.google.ads.AdView Solution: -right click on the project in project tree and select Project properties -select Java Build Path -select TAB Order and Export -check GoogleAdMobAdsSdk-4.0.4.jar (or your version SDK) -press OK … Continue reading

Posted in Bugs, warnings, errors, Eclipse | Tagged , | Comments Off on NoClassDefFoundError: com.google.ads.AdView ADT 17
3,698 views

Admob in Android emulator problem

If admob doesn’t show in application tested on emulator try this solution: Check AndroidManifest.xml 1.) user-permission <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 2.) activity <activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation"/> 3.) metadata <meta-data android:value="my_ad_id_unit" android:name="ADMOB_PUBLISHER_ID" /> This is AndroidManifest.xml example. You have to … Continue reading

Posted in Android Examples Code, Bugs, warnings, errors | Tagged , , | Comments Off on Admob in Android emulator problem