根据https://developers.google.com/mobile-ads-sdk/docs/admob/android/banner创建广告时,没有意图,监听器或onclick类或方法(例如按钮等)
假设这些功能包含在google adView打包方法(参考URL链接)中是否正确?
我问,因为我无法测试广告的“可点击性”..
答案 0 :(得分:0)
以下是Admob横幅广告的Adlistener示例
mAdView.setAdListener(new AdListener() {
@Override
public void onAdLoaded() {
// Code to be executed when an ad finishes loading.
}
@Override
public void onAdFailedToLoad(int errorCode) {
// Code to be executed when an ad request fails.
}
@Override
public void onAdOpened() {
// Code to be executed when an ad opens an overlay that
// covers the screen.
}
@Override
public void onAdLeftApplication() {
// Code to be executed when the user has left the app.
}
@Override
public void onAdClosed() {
// Code to be executed when when the user is about to return
// to the app after tapping on an ad.
}
});
参考:https://developers.google.com/admob/android/banner Reference