Sencha touch 应用浏览器中的Phonegap构建

Sencha touch 应用浏览器中的Phonegap构建,sencha-touch,cordova,phonegap-build,Sencha Touch,Cordova,Phonegap Build,需要在config.xml中添加任何特定设置,才能使inAppBrowser使用phonegap build 我只是补充: var ref = window.open(url, '_blank'); 或 但它不起作用 我的配置xml: <?xml version="1.0" encoding="UTF-8" ?> <widget xmlns = "http://www.w3.org/ns/widgets" xmlns:gap = "http://phonegap.com/ns

需要在config.xml中添加任何特定设置,才能使inAppBrowser使用phonegap build

我只是补充:

var ref = window.open(url, '_blank');

但它不起作用

我的配置xml:

<?xml version="1.0" encoding="UTF-8" ?>
<widget xmlns = "http://www.w3.org/ns/widgets" xmlns:gap = "http://phonegap.com/ns/1.0" id = "com.phonegap.myapp">
    <name>My app</name>
    <description>test</description>
    <preference name="phonegap-version" value="2.7.0" />
    <access origin="*" />
    <preference name="fullscreen" value="false" />
</widget>

我的应用程序
测试

我这样做会打开应用程序内浏览器:

 window.open(destination, '_blank', 'location=yes,enableViewportScale=yes');
在config.xml中,您应该拥有比您在那里拥有的多得多的内容。这是我的:

<?xml version="1.0" encoding="UTF-8"?>

<widget>
<preference name="AllowInlineMediaPlayback" value="false" />
<preference name="AutoHideSplashScreen" value="true" />
<preference name="BackupWebStorage" value="cloud" />
<preference name="DisallowOverscroll" value="false" />
<preference name="EnableLocation" value="false" /><!-- DEPRECATED -->
<preference name="EnableViewportScale" value="false" />
<preference name="FadeSplashScreen" value="true" />
<preference name="FadeSplashScreenDuration" value=".25" />
<preference name="HideKeyboardFormAccessoryBar" value="false" />
<preference name="KeyboardDisplayRequiresUserAction" value="true" />
<preference name="KeyboardShrinksView" value="false" />
<preference name="MediaPlaybackRequiresUserAction" value="false" />
<preference name="ShowSplashScreenSpinner" value="true" />
<preference name="SuppressesIncrementalRendering" value="false" />
<preference name="TopActivityIndicator" value="gray" />

<content src="index.html" />

<plugins>
    <plugin name="Device" value="CDVDevice" />
    <plugin name="Logger" value="CDVLogger" />
    <plugin name="Compass" value="CDVLocation" />
    <plugin name="Accelerometer" value="CDVAccelerometer" />
    <plugin name="Camera" value="CDVCamera" />
    <plugin name="NetworkStatus" value="CDVConnection" />
    <plugin name="Contacts" value="CDVContacts" />
    <plugin name="Debug Console" value="CDVDebugConsole" />
    <plugin name="Echo" value="CDVEcho" />
    <plugin name="File" value="CDVFile" />
    <plugin name="FileTransfer" value="CDVFileTransfer" />
    <plugin name="Geolocation" value="CDVLocation" />
    <plugin name="Notification" value="CDVNotification" />
    <plugin name="Media" value="CDVSound" />
    <plugin name="Capture" value="CDVCapture" />
    <plugin name="SplashScreen" value="CDVSplashScreen" />
    <plugin name="Battery" value="CDVBattery" />
    <plugin name="Globalization" value="CDVGlobalization" />
    <plugin name="InAppBrowser" value="CDVInAppBrowser" />
</plugins>

<access origin="*" />
</widget>


如果你不使用PhoneGap的所有功能,你的手机可能会更小。不过,你肯定需要InAppBrowser插件

我这样做将打开应用程序内浏览器:

 window.open(destination, '_blank', 'location=yes,enableViewportScale=yes');
在config.xml中,您应该拥有比您在那里拥有的多得多的内容。这是我的:

<?xml version="1.0" encoding="UTF-8"?>

<widget>
<preference name="AllowInlineMediaPlayback" value="false" />
<preference name="AutoHideSplashScreen" value="true" />
<preference name="BackupWebStorage" value="cloud" />
<preference name="DisallowOverscroll" value="false" />
<preference name="EnableLocation" value="false" /><!-- DEPRECATED -->
<preference name="EnableViewportScale" value="false" />
<preference name="FadeSplashScreen" value="true" />
<preference name="FadeSplashScreenDuration" value=".25" />
<preference name="HideKeyboardFormAccessoryBar" value="false" />
<preference name="KeyboardDisplayRequiresUserAction" value="true" />
<preference name="KeyboardShrinksView" value="false" />
<preference name="MediaPlaybackRequiresUserAction" value="false" />
<preference name="ShowSplashScreenSpinner" value="true" />
<preference name="SuppressesIncrementalRendering" value="false" />
<preference name="TopActivityIndicator" value="gray" />

<content src="index.html" />

<plugins>
    <plugin name="Device" value="CDVDevice" />
    <plugin name="Logger" value="CDVLogger" />
    <plugin name="Compass" value="CDVLocation" />
    <plugin name="Accelerometer" value="CDVAccelerometer" />
    <plugin name="Camera" value="CDVCamera" />
    <plugin name="NetworkStatus" value="CDVConnection" />
    <plugin name="Contacts" value="CDVContacts" />
    <plugin name="Debug Console" value="CDVDebugConsole" />
    <plugin name="Echo" value="CDVEcho" />
    <plugin name="File" value="CDVFile" />
    <plugin name="FileTransfer" value="CDVFileTransfer" />
    <plugin name="Geolocation" value="CDVLocation" />
    <plugin name="Notification" value="CDVNotification" />
    <plugin name="Media" value="CDVSound" />
    <plugin name="Capture" value="CDVCapture" />
    <plugin name="SplashScreen" value="CDVSplashScreen" />
    <plugin name="Battery" value="CDVBattery" />
    <plugin name="Globalization" value="CDVGlobalization" />
    <plugin name="InAppBrowser" value="CDVInAppBrowser" />
</plugins>

<access origin="*" />
</widget>

如果你不使用PhoneGap的所有功能,你的手机可能会更小。不过,你肯定需要InAppBrowser插件