내 프로젝트에 AdWhirl을 통합했으며 지금 Admob 만 표시하려고합니다.
하나의 광고 만 표시됩니다. 다른 광고는 나오지 않습니다. LogCat에서는 30 초 후에 광고를 새로 고침하지만 화면에 표시되지 않습니다.
AdWhirl의 공식 웹 사이트에서와 동일한 코딩을 사용하고 있습니다.
내가 어떻게이 일을 할 수 있는지 말해 주시오. 나는 그것을 아주 급히 필요로합니다.AdWhirl이 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>
그리고 이것은 내 메인 클래스에 있습니다
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());
}
편집 :
내가 질문 이전에 추가하는 것을 잊었다.
이것은
<meta-data
android:name="ADWHIRL_KEY"
android:value="My_KEY" />
광고 인벤토리에 광고가 없을 수 있습니다. –
이것을 실제 장치 또는 에뮬레이터에서 실행하고 있습니까? –
@Algo ... 동일한 키를 가진 동일한 adhwirl ID가 아이폰 애플리케이션에서 작동하고 광고를 올바르게 표시하고 있습니다. 예 실제 장치 버디에서 테스트했습니다 – Noman