adView = new AdView(this);
adView.setAdSize(AdSize.BANNER);
adView.setAdUnitId(AD_UNIT_ID); ViewGroup parentView = (ViewGroup) xxx; // get some view as it's parent parentView.addView(adView); // Create an ad request. Check logcat output for the hashed device ID to // get test ads on a physical device. AdRequest adRequest = new AdRequest.Builder() .addTestDevice(AdRequest.DEVICE_ID_EMULATOR) .addTestDevice("INSERT_YOUR_HASHED_DEVICE_ID_HERE") .build(); // Start loading the ad in the background. adView.loadAd(adRequest);
--
---
You received this message because you are subscribed to a topic in the Google Groups "Google AdMob Ads Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/9fybcQcwoVA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
I have updated the Google Play Services library to the latest version. and I followed the instructions on Google's Developer site for creating an AdMob Banner ad.
When I run the app, I get a java nullpointerexception when the AdView view is being attempted to inflate by the Activity Manager.
It doesn't matter if I create the AdView in the XML or at runtime in the java code.
Here's my activity's OnResume code, where the error happens.
@Override
protected void onResume() {
super.onResume();
final int connectionStatusCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
if (connectionStatusCode == ConnectionResult.SUCCESS) {
adView = (AdView) this.findViewById(R.id.bannerAdView);
AdRequest adRequest = new AdRequest
.Builder()
.build();
adView.loadAd(adRequest);
}
}// end onResume
My activity's XML code
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/yourbasiclayout"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:paddingLeft="2dp"
android:paddingRight="2dp"
>
<TextView android:id="@+id/myAdView_Label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:textSize="16sp"
android:textStyle="bold"
android:text="Google Ads"/>
<com.google.ads.AdView
android:id="@+id/bannerAdView"
android:layout_width="fill_parent"
android:layout_height="10dp"
ads:adUnitId="MyBannerAdId"
ads:adSize="BANNER" />
</LinearLayout>
--
To unsubscribe from this group and all its topics, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
i m new to android i found some problems in integrating banner and spash together and also how to integrate admob and start app together.
--
how t osolve this problem while exporting projectInvalid proguard configuration file path C:\android-sdk-windows\tools\proguard\proguard-android.txt does not exist or is not a regular file
On Wed, Aug 27, 2014 at 8:09 PM, David wilson <appi...@gmail.com> wrote:
i m new to android i found some problems in integrating banner and spash together and also how to integrate admob and start app together.
--
---
You received this message because you are subscribed to a topic in the Google Groups "Google AdMob Ads Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/9fybcQcwoVA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.