【发布时间】:2012-06-13 14:05:38
【问题描述】:
我正在使用 PhoneGap 框架开发 Blackberry 应用程序。我已经使用下面的链接执行了示例应用程序
http://wiki.phonegap.com/w/page/31930982/Getting%20Started%20with%20PhoneGap%20BlackBerry%20WebWorks
但浏览器无法在我的模拟器中运行。我的意思是,如果我尝试转到 Google 网站,我会遇到以下错误
我也尝试了以下步骤 1)我已经安装了'BlackBerry Email and MDS Services Simulators 4.1.2' 2)运行MDS并运行我的应用程序
即使我遇到问题。请指教!
设备详情: Windows OS,PhoneGap,BlackBerry Email and MDS Services Simulators 4.1.2,Simulator:9550,BlackBerry WebWorks SDK 2.3.1.5
配置.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
Widget Configuration Reference:
http://docs.blackberry.com/en/developers/deliverables/15274/
-->
<widget xmlns="http://www.w3.org/ns/widgets"
xmlns:rim="http://www.blackberry.com/ns/widgets"
version="1.0.0.0">
<name>Corperate Directory</name>
<access subdomains="false" uri="http://www.google.com"/>
<description>
A sample application written with Cordova.
</description>
<license href="http://opensource.org/licenses/alphabetical">
</license>
<!-- Cordova API -->
<feature id="blackberry.system" required="true" version="1.0.0.0" />
<feature id="org.apache.cordova" required="true" version="1.0.0" />
<feature id="blackberry.find" required="true" version="1.0.0.0" />
<feature id="blackberry.identity" required="true" version="1.0.0.0" />
<feature id="blackberry.pim.Address" required="true" version="1.0.0.0" />
<feature id="blackberry.pim.Contact" required="true" version="1.0.0.0" />
<feature id="blackberry.io.file" required="true" version="1.0.0.0" />
<feature id="blackberry.utils" required="true" version="1.0.0.0" />
<feature id="blackberry.io.dir" required="true" version="1.0.0.0" />
<feature id="blackberry.app" required="true" version="1.0.0.0" />
<feature id="blackberry.app.event" required="true" version="1.0.0.0" />
<feature id="blackberry.system.event" required="true" version="1.0.0.0"/>
<feature id="blackberry.widgetcache" required="true" version="1.0.0.0"/>
<feature id="blackberry.media.camera" />
<feature id="blackberry.ui.dialog" />
<!-- Cordova API -->
<access subdomains="true" uri="file:///store/home" />
<access subdomains="true" uri="file:///SDCard" />
<!-- Expose access to all URIs, including the file and http protocols -->
<access subdomains="true" uri="*" />
<icon rim:hover="false" src="resources/icon.png" />
<icon rim:hover="true" src="resources/icon.png" />
<rim:loadingScreen backgroundColor="#CFCFCF"
foregroundImage="resources/loading_foreground.png"
onFirstLaunch="true">
<rim:transitionEffect type="fadeOut" />
</rim:loadingScreen>
<content src="index.html" />
<rim:permissions>
<rim:permit>use_camera</rim:permit>
<rim:permit>read_device_identifying_information</rim:permit>
<rim:permit>access_shared</rim:permit>
<rim:permit>read_geolocation</rim:permit>
</rim:permissions>
</widget>
【问题讨论】:
-
我不明白。为什么要通过 phonegap 访问外部站点?创建 phonegap 的目的是将 本地 html 页面显示为应用程序的 UI,而不是用作浏览器,为此,您可以使用浏览器。
-
是的,但我的应用程序是基于 Web 服务的。需要实现为黑莓应用程序。在这种情况下,网络应该可以访问服务器!为了检查我的网络是否正常工作,我尝试访问 Google 网站。我也需要帮助。
-
您是否在黑莓清单文件中设置了适当的权限?
-
对不起,我不知道..你能解释一下吗!
-
在您的项目文件之间找到一个名为“config.xml”的文件并将其内容发布到您的问题中。
标签: web-services cordova phonegap-plugins