Admobpro Cordova Plugin test admob ads in ionic view?


#1

Hy guys i have the admobpro cordova plugin installed on my project.
Is there any testmode that i can test the ads in ionic view or in browser?
I published an apk and the ads works on the android device. But i want to test them in ionic view also.
Is there any solution?
This is my code if it is nessasary:

import { Component } from '@angular/core';
import { NavController, Platform } from 'ionic-angular';
import { Music } from '../Music/Music';
import { Sports } from '../Sports/Sports';
import { Art } from '../Art/Art';

declare var AdMob: any;

@Component({
  selector: 'page-Explore',
  templateUrl: 'Explore.html'
})
export class Explore {
  
  private admobId: any;

  constructor(public navCtrl: NavController, private platform: Platform) {
        this.platform = platform;
        if(/(android)/i.test(navigator.userAgent)) {
            this.admobId = {
                banner: 'ca-app-pub-453',
            };
        } else if(/(ipod|iphone|ipad)/i.test(navigator.userAgent)) {
            this.admobId = {
                banner: 'ca-app-pub-34858',
            };
        }
        this.createBanner();
  }

   createBanner() {
        this.platform.ready().then(() => {
            if(AdMob) {
                AdMob.createBanner({
                    adId: this.admobId.banner,
                    autoShow: false
                });
            }
        });
        this.showBanner("bottom");
    }

    showBanner(position) {
        this.platform.ready().then(() => {
            if(AdMob) {
                var positionMap = {
                    "bottom": AdMob.AD_POSITION.BOTTOM_CENTER,
                    "top": AdMob.AD_POSITION.TOP_CENTER
                };
                AdMob.showBanner(positionMap[position.toLowerCase()]);
            }
        });
    }

#2

The Ionic View app doesn’t contain the native parts of the plugin, so it is not possible to use the plugin functionality. (Same goes for browser, unless the plugin explicitly handles this.)


#3

Ah ok well then things got clear here.
The we need to test it native thanks for the info.