在我的Android应用(HTML5,Webview)中,我想使用插页式全屏广告。要成功加载广告,则会显示该广告,但不幸的是,广告对任何互动(触摸)都没有反应,例如
只有Android的“后退键”有效。
从用户的角度来看,当然这是不可接受的。
我已经尝试过
我使用以下代码初始化广告/框架:
MobileAds.initialize(getApplicationContext(), "ca-app-pub-75007419xxxxxxx~7207yyyyyyy");
AdRequest adRequest = new AdRequest.Builder()
.addTestDevice(testDevice)
.build();
mAd_screen = new InterstitialAd(getApplicationContext());
mAd_screen.setAdUnitId("ca-app-pub-75007419xxxxxxx/76137yyyyyyy");
mAd_screen.loadAd(adRequest);
显示广告:
if (mAd_screen!=null && mAd_screen.isLoaded()) {
mAd_screen.show();
}
预期结果是,全屏广告的反应方式与横幅广告类似:
当我点击广告时,我在日志中找到的内容:
04-03 15:03:55.033 2840-2925/? D/InputReader: Input event(7): value=1 when=16508820098000
04-03 15:03:55.034 2840-2925/? I/InputReader: Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.2245 ] when=16508820098000
04-03 15:03:55.034 2840-2924/? I/InputDispatcher: Delivering touch to (677): action: 0x0, toolType: 1
04-03 15:03:55.035 677-677/? D/ViewRootImpl@a4a620d[AdActivity]: ViewPostImeInputStage processPointer 0
因此,似乎触摸事件已被识别,但未定义/执行任何动作。...