Mam zintegrowaną AdWhirl w moim projekcie i chcę wyświetlić teraz tylko AdMob.
Ale wyświetlana jest tylko jedna reklama ... żadne inne reklamy nie nadchodzą ... w LogCat odświeżają reklamy po 30 sekundach, ale nie są wyświetlane na ekranie.
Używam tego samego kodu, co na oficjalnej stronie AdWhirl.
Proszę, powiedz mi, jak mogę to zrobić ... Potrzebuję tego bardzo pilnie.AdWhirl nie wyświetla reklam AdMob
<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>
I to jest w moim główne klasy:
try
{
AdWhirlManager.setConfigExpireTimeout(1000 * 60 * 5);
AdWhirlTargeting.setAge(23);
// AdWhirlTargeting.setGender(AdWhirlTargeting.Gender.MALE);
// AdWhirlTargeting.setKeywords("online games gaming");
// AdWhirlTargeting.setPostalCode("94123");
AdWhirlTargeting.setTestMode(false);
AdWhirlLayout adWhirlLayout = (AdWhirlLayout) findViewById(R.id.adwhirl_layout);
// TextView textView = new TextView(this);
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);
// textView.setText("");
LinearLayout layout = (LinearLayout) findViewById(R.id.layout_main);
layout.setGravity(Gravity.CENTER_HORIZONTAL);
layout.addView(adWhirlLayout, layoutParams);
// layout.addView(textView, layoutParams);
// layout.invalidate();
}
catch (Exception e)
{
Log.e("error", e.toString());
}
EDIT:
zapomniałem dodać pytanie wcześniej.
To jest mój plik manifest.xml
<meta-data
android:name="ADWHIRL_KEY"
android:value="My_KEY" />
Może nie być żadnych reklam w ekwipunku. –
Czy uruchamiasz to na urządzeniu rzeczywistym lub emulatorze? –
@Algo ... ten sam identyfikator adhwirl z tym samym kluczem działa na aplikacji Iphone i wyświetla reklamy prawidłowo. Tak, testuję to na kumplu z prawdziwego urządzenia – Noman