Admob policies in android applications



i just want to integrate AdMob in my application and have the following XML:



<LinearLayout xmlns:android="http://ift.tt/nIICcg"
xmlns:tools="http://ift.tt/LrGmb4"
xmlns:ads="http://ift.tt/GEGVYd"
android:id="@+id/container"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
android:orientation="vertical"
tools:context="MainApp"
tools:ignore="MergeRootFrame" >

<TextView
android:id="@+id/mainHeaderTextView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingBottom="15dp"
android:paddingTop="15dp"
android:scaleType="center"
android:text="@string/app_name"
android:textSize="25sp" />



<ListView
android:id="@+id/mainListView"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:paddingBottom="25dp"
android:paddingLeft="10dp"
android:paddingRight="10dp" >
</ListView>

<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
ads:adSize="BANNER"
ads:adUnitId="my_unit_id" >
</com.google.android.gms.ads.AdView>

</LinearLayout>


The Java Code is as follows:



AdView adView = (AdView) this.findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
adView.loadAd(adRequest);


When i am starting the app, i get error messages like "The page at about about: blank displayed insecure content from gmsg://....."


I read about the google policies here.


I think my problem is described at the last part "Ad covering app content (Not recommended - against policy)". But how to solve this? Any ideas?


UPDATE: After installing the app on a real device, i get ads. What is the reason for this behaviour?


No comments:

Post a Comment