I included AdWhirl in my project, and now I want to display only Admob.
But only one ad is shown ... no other ads arrive .... LogCat updates the advertisement after 30 seconds, but they do not appear on the screen.
I use the same encoding as on the official AdWhirl website.
Please tell me how I can do this ... It is very urgent for me.
<LinearLayout
android:id="@+id/layout_main"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:orientation="vertical" >
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="" />
<com.adwhirl.AdWhirlLayout
android:id="@+id/adwhirl_layout"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>
And this is in my main class:
try
{
AdWhirlManager.setConfigExpireTimeout(1000 * 60 * 5);
AdWhirlTargeting.setAge(23);
AdWhirlTargeting.setTestMode(false);
AdWhirlLayout adWhirlLayout = (AdWhirlLayout) findViewById(R.id.adwhirl_layout);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
int diWidth = 320;
int diHeight = 52;
int density = (int) getResources().getDisplayMetrics().density;
adWhirlLayout.setAdWhirlInterface(this);
adWhirlLayout.setMaxWidth((int) (diWidth * density));
adWhirlLayout.setMaxHeight((int) (diHeight * density));
layoutParams.addRule(RelativeLayout.CENTER_HORIZONTAL);
LinearLayout layout = (LinearLayout) findViewById(R.id.layout_main);
layout.setGravity(Gravity.CENTER_HORIZONTAL);
layout.addView(adWhirlLayout, layoutParams);
}
catch (Exception e)
{
Log.e("error", e.toString());
}
EDIT:
I forgot to add to the question earlier.
This is my manifest.xml file
<meta-data
android:name="ADWHIRL_KEY"
android:value="My_KEY" />
source
share