黑莓应用程序工作在模拟器

黑莓应用程序工作在模拟器

本文介绍了黑莓应用程序工作在模拟器,但没有设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读了一些对付一下似乎是同样的问题,答复没有真正似乎澄清事情,我在这个网站类似的帖子。

I read some of the similar posts on this site that deal with what seems to be the same issue and the responses didn't really seem to clarify things for me.

我的应用程序在模拟器中工作正常。我相信我的粗体9000 OS 4.6。这款应用程序签名。

My application works fine in the simulator. I believe I'm on Bold 9000 with OS 4.6. The app is signed.

我的应用程序,使通过3G HTTP调用获取XML结果。类型是application / xhtml + xml。
在该装置中,它给没有错误。它使错误的没有视觉标志。我告诉尝试捕捉打印结果到屏幕上,我什么也没得到。
的HttpConnection被带到右出的演示和SIM卡正常工作。

My app makes an HTTP call via 3G to fetch an XML result. type is application/xhtml+xml.In the device, it gives no error. it makes no visual sign of error. I tell the try catch to print the results to the screen and I get nothing.HttpConnection was taken right out of the demos and works fine in sim.

由于它不提供任何错误,我开始反思回事情,我记得读回当项目开始。 deviceside =真的吗?类似的东西?
我的要求很简单的HttpConnection连接=(HttpConnection的)Connector.open(URL);
其中URL是个标准的URL,没有get瓦尔。
根据我看到连接的箭头在屏幕一角的时间,我假设应用程序被启动初步沟通到我的服务器,然后可以得到一个坏的结果,或者它得到的结果和持久性存储是不是正常预计。

Since it gives no error, I begin to reflect back on things I recall reading back when the project began. deviceside=true? Something like that?My request is simply HttpConnection connection = (HttpConnection)Connector.open(url);where url is just a standard url, no get vars.Based on the amount of time I see the connection arrows in the corner of the screen, I assume the app is launching the initial communication to my server, then either getting a bad result, or it gets results and the persistent store is not functioning as expected.

我不知道从哪里开始与此有关。发帖code将是荒谬的,因为这将是我的基本上整个应用程序。

I have no idea where to begin with this. Posting code would be ridiculous since it would be basically my whole app.

我想我的问题是,如果任何人与设备的任何重大分歧与模拟器,可能会导致类似的HTTP连接或持久性存储失败,谁知道呢?
一次构建设置?操作系统限制?我可能只是不知道这个每个人的标准程序开始设备测试之前,应该怎么办?

I guess my question is if anyone knows of any major differences with device versus simulator that could cause something like http connection or persistent store to fail?A build setting? An OS restriction? Any standard procedure I may have just not known about that everyone should do before beginning device testing?

感谢

推荐答案

只是提供的URL将无法正常工作。您必须在URL后追加一些信息,以确定您的HTTP连接将使用的传输方法。例如将使用DirectTCP(您可能还需要提供APN信息,但是这保存在设备上的我的电话)。 将使用Wi-Fi。在OS 5有一个ConnectionFactory类,使这个容易得多。 这里有一个链接的进入更多的细节。

Just providing the URL will not work. You will have to append some info after the URL to determine the transport method your HTTP connection will use. For instance http://example.com;deviceside=true will use DirectTCP (you might also have to supply APN information but that's saved on the device for my phone). http://example.com;interface=wifi will use wi-fi. On OS 5 there's a ConnectionFactory class that makes this a lot easier. Here's a link that goes into more detail.

这篇关于黑莓应用程序工作在模拟器,但没有设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 06:31