Software Archive
Read-only legacy content
17061 Discussions

Opening links does not work in the code.

S_L_D_K
Beginner
318 Views

Hello everyone who responded. I have version Intel 2893. When creating an application with plugin AdMob, the link doesn't work '<meta http-equiv="refresh" content="5; url=http://tropicalreefcamera.esy.es/">'

 

<!DOCTYPE html>
<html>
 <head>
 <meta http-equiv="refresh" content="5; url=http://tropicalreefcamera.esy.es/">
 <meta charset="utf-8" />
 <meta name="format-detection" content="telephone=no" />
 <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" />
 <title>Hello World</title>
 <script type="text/javascript" src="cordova.js"></script>
 <style type="text/css">
            html, body { width:100%; height:100%; margin:0; padding:0; overflow:hidden; background-color:white; }
            div#fullpage { width:100%; height:100%; margin:0; padding:0; border:0px solid red; text-align:center; vertical-align:middle; }
            button { font-size: 22px; }
 </style>
 </head>
 <body onload="onDocLoad()" onresize="onResize()">
 <script>
    function onDocLoad() {
        if(( /(ipad|iphone|ipod|android|windows phone)/i.test(navigator.userAgent) )) {
            document.addEventListener('deviceready', initApp, false);
 } else {
            initApp();
        }
    }
    
   function initApp() {
        initAd();
        // display the banner at startup
        window.plugins.AdMob.createBannerView();
       window.plugins.AdMob.createInterstitialView();
    }
     
    function initAd(){
        if ( window.plugins && window.plugins.AdMob ) {
            var ad_units = {
 ios : {
 banner: 'ca-app-pub-5181905520956842/6791564214',
 interstitial: 'ca-app-pub-5181905520956842/8268297413'
                },
 android : {
 banner: 'ca-app-pub-5181905520956842/6791564214',
 interstitial: 'ca-app-pub-5181905520956842/8268297413'
                },
 wp8 : {
 banner: 'ca-app-pub-5181905520956842/6791564214',
 interstitial: 'ca-app-pub-5181905520956842/8268297413'
                }
            };
            var admobid = "";
            if( /(android)/i.test(navigator.userAgent) ) {
 admobid = ad_units.android;
 } else if(/(iphone|ipad)/i.test(navigator.userAgent)) {
 admobid = ad_units.ios;
 } else {
 admobid = ad_units.wp8;
            }
            window.plugins.AdMob.setOptions( {
 publisherId: admobid.banner,
 interstitialAdId: admobid.interstitial,
 bannerAtTop: false, // set to true, to put banner at top
 overlap: false, // set to true, to allow banner overlap webview
 offsetTopBar: false, // set to true to avoid ios7 status bar overlap
 isTesting: false, // receiving test ad
 autoShow: true // auto show interstitial ad when loaded
            });
            registerAdEvents();
            
 } else {
            alert( 'admob plugin not ready' );
        }
    }
    // optional, in case respond to events
    function registerAdEvents() {
        document.addEventListener('onReceiveAd', function(){});
        document.addEventListener('onFailedToReceiveAd', function(data){});
        document.addEventListener('onPresentAd', function(){});
        document.addEventListener('onDismissAd', function(){ });
        document.addEventListener('onLeaveToAd', function(){ });
        document.addEventListener('onReceiveInterstitialAd', function(){ });
        document.addEventListener('onPresentInterstitialAd', function(){ });
        document.addEventListener('onDismissInterstitialAd', function(){ });
    }
    function onResize() {
        var msg = 'web view: ' + window.innerWidth + ' x ' + window.innerHeight;
        document.getElementById('sizeinfo').innerHTML = msg;
    }
 </script>
 
    
 </body>
</html>

0 Kudos
2 Replies
S_L_D_K
Beginner
318 Views

The problem is solved on version 2893. Plug-in com.google.admobsdk

0 Kudos
Aulia_R_
Beginner
318 Views

help help help

0 Kudos
Reply