问题标签 [rim-4.2]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
707 浏览

blackberry - Location API not working for custom/third-party applications

I'm trying to write a simple GPS based application for my BB 8800 (with Airtel, India).

But for some reason my code getLocation(timeout) always returns with a non-valid location (only after timing out). I tried different combinations of criteria parameters with no success.

I'm pretty sure that the problem is not with my code because even the BlackBerry GPS demo application does not work. However, my GPS receiver is working fine because "Wayfinder", a maps application that came bundled with my BB, works fine.

To test it further, I tried running SpotFinder and Google Maps. But they did not work either. Google Maps could determine location using cell tower info but not GPS.

Here are some more details about my environment, 1. Phone Model: BlackBerry 8800 2. Carrier: AirTel (India) 3. Device Version: 4.2.168 (Platform 2.3.0.54)

Can my carrier block it? [I spoke with AirTel technical support but they wouldn't budge to help developers]

Thanks In Advance

0 投票
2 回答
3619 浏览

xml - 我应该如何从 J2ME 中的流中去除无效的 XML 字符?org.xml.sax.SAXParseException:无效字符

此代码在 Blackberry JDE v4.2.1 上运行。它采用一种方法,可以进行返回 XML 的 Web API 调用。有时,返回的 XML 格式不正确,我需要在解析之前去除所有无效字符。

目前,我得到:org.xml.sax.SAXParseException: Invalid character '' encountered.

我希望看到一种在输入流上附加无效字符剥离器的快速方法的想法,以便流只流经验证器/剥离器并进入解析调用。即我试图避免保存流的内容。

现有代码:

handlerDefaultHandler
url的覆盖是一个包含 API 的字符串URL

0 投票
1 回答
1129 浏览

user-interface - 如何在黑莓应用程序文本字段中启用自动大写、标点、文本功能?

我正在使用 RIM JDE 4.2.1

我希望我的文本字段自动大写句子的第一个字母,在末尾添加标点符号,并引用设备上的 AutoText DB。看起来这将/应该是 API 中的字段类型,但要么我错过了它,要么它不存在。

作为参考,API 位于此处: http: //www.blackberry.com/developers/docs/4.2.1api/index.html

0 投票
1 回答
843 浏览

blackberry - 黑莓模拟器“fileconn.dir.photos”的位置?

我在 BlackBerry JDE 4.2.0 和它附带的 8100 模拟器上遇到了一个奇怪的问题:

这将返回 null!

这适用于我迄今为止使用过的所有 J2ME 电话和仿真器。为了让它在黑莓模拟器上运行,我需要做些什么特别的事情吗?请注意,我不想要 SD 卡图像路径,而是手机的内部存储。

0 投票
2 回答
763 浏览

user-interface - 在布局管理器中取消滚动

我找不到以下问题的解决方案。我有自定义列表字段,它与布局管理器的边界重叠。列表字段使用来自管理器的导航事件以用特殊颜色突出显示当前选定的行。布局管理器配置为支持滚动。当我向下滚动拨轮时,布局管理器调用滚动,然后将导航事件传递给它的子项,即列表字段。它会导致不正确的滚动,因为管理器将整个列表向下滚动到其底部隐藏列表行的顶部,包括选定的行。

我想要的是在当前选定的列表行仍然可见时忽略滚动,否则使用它。

我正在使用 JDE 4.2.1

0 投票
1 回答
2709 浏览

networking - 如何检测可用的 APN 设置?

我需要在我的 BlackBerry 应用程序中以某种方式访问​​ APN 设置。我的应用程序在 JDE 4.2.1 上运行。有什么帮助吗?

0 投票
5 回答
1250 浏览

math - 在 Blackberry 4.2 JDE 上调用 atan 函数

我需要从我的 Blackberry Java 应用程序计算 arc tan 值。不幸的是,blackberry 4.2 api 没有 Math.atan() 函数。Blackberry JDE 的 4.6 版有它,但 4.2 版没有。

有谁知道计算atan的解决方法?

0 投票
3 回答
6007 浏览

blackberry - 如何从 BlackBerry 应用程序的类路径中读取资源文件?

我需要从 BlackBerry 应用程序的类路径中读取资源文件。我的项目的目录结构很常见:在 src 目录下有 2 个子目录,一个代表源包根目录,另一个代表资源根目录。

当我尝试从类路径读取任何资源时Class.getResourceAsStream方法返回 null

我应该如何正确读取类路径资源?

0 投票
2 回答
754 浏览

html - 黑莓浏览器 4.2 的间距问题

我正在编写一个针对黑莓浏览器 4.2 的 Web 应用程序。我想在链接列表之间有一些垂直间距。我知道 4.2 不支持填充和边距,但我认为它支持高度或行高。我也不能上班。

我真的不想使用换行符。有什么建议么

0 投票
1 回答
756 浏览

blackberry - 未调用 moveFocus

我有一个带有实现滚动例程的自定义对象列表字段。

当我使用拨轮滚动时,滚动工作正常,但在带有轨迹球的设备上启动应用程序时会损坏。我发现问题出在框架方法 moveFocus 上,当我使用轨迹球滚动时根本不会调用它。