来自Blackberry Phonegap应用程序的Ajax请求 [英] Ajax request from Blackberry Phonegap application

查看:208
本文介绍了来自Blackberry Phonegap应用程序的Ajax请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为Blackberry(OS 5.0及更高版本)创建应用程序。我没有任何过去的移动开发经验。我创建了一个工作正常的示例应用程序(按照 http://wiki.phonegap.com/w/page/31930982/Getting-Started-with-PhoneGap-BlackBerry-WebWorks )。我已安装




  • JDK - version 1.6.0_23

  • Apache Ant - 1.8.2

  • BBWP - 1.5.1.22

  • phonegap - 0.9.3



(在BlackBerry 9550模拟器上运行)



我想要做的是一个简单的AJAX域请求(即www.sampledomain.com - www.sampledomain。 com在我的本地服务器上托管。)



我在www config.xml文件中添加了以下内容

 < access uri =http://www.sampledomain.comsubdomains =true/>问题是,当我发送Ajax请求时,我收到消息错误:请求资源时出错。 。



(我没有在apache访问日志中获取www.sampledomain.com的任何请求。)



任何人都知道什么可能是什么原因?我该如何解决这个问题?
感谢

解决方案

首先快速回答:



在SDK路径中,您将找到一个MDS代理
\BlackBerry\plugins\\\
et.rim.ejde.componentpack5.0.0_5.0.0.25\components\MDS\run.bat
运行该程序,然后您就可以向互联网发出请求。



有很多不同的方式可以连接到黑莓上的互联网,你现在有一个很多阅读要做:



这是一个很棒的链接,可以帮助你开始你的路径
http://supportforums.blackberry.com/t5/Java-Development/Connecting- your-BlackBerry-http-and-socket-connections-to-the / td-p / 206242



干杯



Ray


I am creating an application for Blackberry (OS 5.0 and higher). I don't have any past experience in mobile development. I have created a sample application that is working fine (by following guidelines mentioned in http://wiki.phonegap.com/w/page/31930982/Getting-Started-with-PhoneGap-BlackBerry-WebWorks). I have installed

  • JDK - version 1.6.0_23
  • Apache Ant - 1.8.2
  • BBWP - 1.5.1.22
  • phonegap - 0.9.3

(Running on BlackBerry 9550 Simulator)

What I want to do is a simple AJAX request to domain (i.e. www.sampledomain.com - where www.sampledomain.com is hosted on my local server.)

I have added following in www config.xml file

<access uri="http://www.sampledomain.com" subdomains="true" />

The problem is that when I send Ajax request I get the message "Error: Error requesting resource.".

(I am not getting any request in apache access log for www.sampledomain.com).

Any one know what can be the reason for that? And how can I fix that? Thanks

解决方案

First the quick answer:

In your SDK path you will find an MDS proxy \BlackBerry\plugins\net.rim.ejde.componentpack5.0.0_5.0.0.25\components\MDS\run.bat Run that and you should then be able to make requests to the internet.

There are many different ways you can connect to the internet on a BlackBerry and you now have a lot of reading to do:

This is a fantastic link to start you on your path http://supportforums.blackberry.com/t5/Java-Development/Connecting-your-BlackBerry-http-and-socket-connections-to-the/td-p/206242

Cheers

Ray

这篇关于来自Blackberry Phonegap应用程序的Ajax请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆