AdMob not loading ads in ionic/angular app

前端 未结 4 1106
夕颜
夕颜 2021-01-03 03:09

I\'m having some problems getting ads to work. I can\'t rap my brain around why it isn\'t working. I have the following plugins installed:

com.google.playservices 19

4条回答
  •  清酒与你
    2021-01-03 04:05

    I am the author of the plugin you are using. Please migrate to the pro version:

    cordova plugin add com.google.cordova.admob
    

    Or (if you are using cordova CLI v5.x),

    cordova plugin add cordova-plugin-admobpro
    

    Here is a working demo using cordova-plugin-admobpro in a Ionic framework APP: https://github.com/floatinghotpot/admob-demo-app-ionic

    Suggest:

    1. Follow the commands in the link to build a working demo;
    2. Look into the content in demo/ folder and check file js/admob.js

    https://github.com/floatinghotpot/admob-demo-app-ionic/blob/master/demo/js/admob.js

    You can even directly copy this file to your project, then reference in your index.html:

    
    

    Like this demo index.html: https://github.com/floatinghotpot/admob-demo-app-ionic/blob/master/demo/index.html#L21

提交回复
热议问题