使用。
如何触发间隙关闭事件,
//this is the code found for javscript
document.addEventListener('admob.interstitial.events.CLOSE', function (event) {
console.log(event)
admob.interstitial.prepare()
})
//i want this code in ionic3
有人可以帮助如何在typescript/ ionic3中做到这一点吗?
document.addEventListener在types
我有一个Ionic 3项目,它在Ionic DevApp和Xcode上正常运行。但是当我添加AdMob插件时,它通常运行在Ionic DevApp上,但它不在Xcode上运行。我试过模拟器和真正的设备,但我有一些错误,两者。
这是我的错误代码;
Terminating app due to uncaught exception
'GADInvalidInitializationException', reason:
'The Google Mobile Ads SDK was initialized incorrectly.
Google AdMob publish
我想在我的一个应用程序中使用Admob,但它不工作。它甚至不会显示任何java脚本错误。如果我做错了什么,请告诉我。
这是我的app.js文件
// Ionic Starter App
// angular.module is a global place for creating, registering and retrieving Angular modules
// 'starter' is the name of this angular module example (also set in a <body> attribute in index.ht
我正在尝试通过示例集成电容器Admob https://ionicframework.com/docs/native/admob 但 import { Admob } from '@ionic-native/admob';
...
constructor(private admob: Admob) 失败,错误为 [ng] ERROR in src/app/map/map.page.ts:81:30 - error TS2749: 'Admob' refers to a value, but is being used as a type here.
我在Ionic中使用AdMob插件,在这段代码中,我显示了一个间隙广告:
function initAd(){
// it will display smart banner at top center, using the default options
if(AdMob) AdMob.createBanner( {
adId: admobid.banner,
bannerId: admobid.banner,
position: AdMob.AD_POSITION.BOTTOM_CENTER,
a
我遵循,本教程成功地完成了所有设置,并且这些命令成功地运行了npm run build:ssr和npm run serve:ssr,然后它们给我在浏览器Node Express服务器上运行 的端口,但是当在chrome中打开这个端口时,我得到了错误错误ReferenceError: self是未定义的
ReferenceError: self is not defined
at Object.607 (F:\ionic4-project\app\dist\2.js:44:9)
at __webpack_require__ (F:\ionic4-project\app\dist\
我使用的是github的cordova插件,该插件在ionic原生版本中不可用。
我有问题。如何在Ionic 2中使用非离子原生插件?
我试着:
declare var myPlugin: any;
myPlugin.doSomething(...)
和其他论坛解决方案
但我有个错误:
ReferenceError: myPlugin is not defined
at new HomePage (http://localhost:8100/build/main.js:18762:9)
我的配置:
Ionic Framework: ^2.0.0-rc.3
Ionic Native: ^2.2