0

Ich brauche externen Link in Cordova innerhalb der App für Windows zu öffnen, habe ich inAppBrowser Plugin und versuchte verschiedene Wege, aber es nicht offen, was ich erwartet hatte. Aber es funktionierte für Android und iOS.Externer Link in Cordova mit in App für Windows öffnen

var app = { 
// Application Constructor 
initialize: function() { 
    this.bindEvents(); 
}, 
// Bind Event Listeners 
// 
// Bind any events that are required on startup. Common events are: 
// 'load', 'deviceready', 'offline', and 'online'. 
bindEvents: function() { 
    document.addEventListener('deviceready', this.onDeviceReady, false); 
}, 
// deviceready Event Handler 
// 
// The scope of 'this' is the event. In order to call the 'receivedEvent' 
// function, we must explicitly call 'app.receivedEvent(...);' 
onDeviceReady: function() { 
    //app.receivedEvent('deviceready'); 
    window.open('http://stackoverflow.com/', '_blank'); 

     }, 
    };app.initialize(); 

Ich habe versucht, sowohl _self und _blank wie die

window.open('http://stackoverflow.com/', '_self'); 
window.open('http://stackoverflow.com/', '_blank'); 

_self wird jede Seite nicht öffnen, aber _blank die Seite mit Polsterung öffnen unten Bildschirm entnehmen Sie bitte

screen shot

Wie kann ich den Vollbildmodus ohne diese Anzeige anzeigen?

meine HTML-Seite ist

<html> 
<head> 
    <!-- 
    Customize this policy to fit your own app's needs. For more guidance, see: 
     https://github.com/apache/cordova-plugin-whitelist/blob/master/README.md#content-security-policy 
    Some notes: 
     * gap: is required only on iOS (when using UIWebView) and is needed for JS->native communication 
     * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly 
     * Disables use of inline scripts in order to mitigate risk of XSS vulnerabilities. To change this: 
      * Enable inline JS: add 'unsafe-inline' to default-src 
    --> 
    <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *"> 
    <meta name="format-detection" content="telephone=no"> 
    <meta name="msapplication-tap-highlight" content="no"> 
    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width"> 
    <link rel="stylesheet" type="text/css" href="css/index.css"> 
    <title>Hello World</title> 
    <script type="text/javascript" src="cordova.js"></script> 
    <script type="text/javascript" src="js/index.js"></script> 
    <script src="phonegap.js"></script></head> 

Dank.

Antwort

1

auf dem einzigen InAppBrowser documentation:

Windows-basierte:

Vollbild: auf yes setzen die Browser-Steuerung ohne Rand um es zu schaffen. Bitte beachten Sie, dass, wenn auch location = no angegeben ist, dem Benutzer keine Kontrolle über das Schließen des IAB-Fensters angeboten wird.

also in Ihrem Fall:

window.open ('http://stackoverflow.com', '_blank', 'Vollbild = yes');

+0

danke, wie man mit windows zurück taste für ging auf die vorherige seite in cordova – Manikandan

Verwandte Themen