http - 黑莓 http 连接在 3g 上不起作用

标签 http blackberry

嗨 friend 们,我是黑莓编程的新手,并成功制作了一个小应用程序...该应用程序通过http下载一个xml文件并解析它并将其显示在屏幕上...现在的问题是,虽然它在我的模拟器上运行良好...客户提示说,如果他通过 3G 连接它,他会收到连接错误...我是否需要添加除以下内容之外的任何内容...

        // Build a document based on the XML file.
        url = <my clients url file>;
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        DocumentBuilder builder = factory.newDocumentBuilder();
        hc = (HttpConnection)Connector.open(url+";deviceside=true");
        hc.setRequestMethod(HttpConnection.GET);
        InputStream inputStream = hc.openInputStream();
        hc.getFile();
        Document document = builder.parse(inputStream);
        hc.close();
        inputStream.close();

我需要添加任何内容才能使其也通过 3G 下载 http 内容吗?

最佳答案

指定“deviceside=true”要求设备正确配置 APN,或者在 URL 中包含 APN 规范。看看这个video .

关于http - 黑莓 http 连接在 3g 上不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2047854/

相关文章:

html - 页面更改时是否可以将客户端状态保存在 iFrame 中?

python - Azure Devops Rest API 授权 header 不起作用

c - 从文件中读取并输出到套接字

java - 读取自定义 JAD 属性时出现空值

android - LWUIT 端口、黑莓和安卓

android - iOS - 从应用程序内调用 Web 应用程序

blackberry - 黑莓中的目录/文件夹监听器

http - Cloud foundry/XSA 如何制作仅 http 服务

javascript - (object Object) 从 Node 中的 JSON 请求返回

java - 黑莓|当应用程序在后台时,不会调用 MediaKeyListener 中的 keyUp 和 keyDown 方法