因此,正如问题所暗示的那样,我试图让全屏广告正常工作,我拥有它,所以它们确实出现了,但它们只在那里停留了 4 秒左右,然后消失了
我在做什么/做错了什么,我似乎无法从 adfonic 找到任何文档,而且所有的 admobs 似乎都太不一样了,无法提供任何帮助。
public class AdPage extends Activity implements OnClickListener {
Button Close;
private final static String TAG = "Testing";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.ad_layout);
final AdfonicView adView = (AdfonicView) findViewById(R.id.adfonicView);
adView.setAdListener(new AdListener() {
@Override
public void onReceivedAd() {
Log.d(TAG, "AdListener onReceivedAd()");
adView.showInterstitial();
}
@Override
public void onPresentScreen() {
Log.d(TAG, "AdListener onPresentScreen()");
}
@Override
public void onNoFill() {
Log.d(TAG, "AdListener onNoFill()");
}
@Override
public void onNetworkError() {
Log.d(TAG, "AdListener onNetworkError()");
}
@Override
public void onLeaveApplication() {
Log.d(TAG, "AdListener onLeaveApplication()");
}
@Override
public void onInvalidRequest() {
Log.d(TAG, "AdListener onInvalidRequest()");
}
@Override
public void onInternalError() {
Log.d(TAG, "AdListener onInternalError()");
}
@Override
public void onDismissScreen() {
Log.d(TAG, "AdListener onDismissScreen()");
}
@Override
public void onClick() {
Log.d(TAG, "AdListener onClick()");
}
});
这是布局
<com.adfonic.android.AdfonicView
xmlns:adfonic="http://schemas.android.com/apk/lib/com.adfonic.android"
android:id="@+id/adfonicView"
android:layout_width="match_parent"
android:layout_height="match_parent"
adfonic:adfonic_adslot_id="######"
adfonic:language="en"
adfonic:refresh_ad="true"
adfonic:refresh_time="30" />