使用 Java ME 的诺基亚不支持 FocusControl?

发布于 2024-09-16 20:03:53 字数 762 浏览 4 评论 0原文

我正在开发一个 Java ME 应用程序,它使用相机拍摄快照,然后对其进行解码(使用 ZXing< /a> 库)。目标是诺基亚手机。

我需要使用焦点来获得清晰的图像,如果没有,则很难解码图像。

从 Series 40 开始,可以使用“videocontrol”和“SnapShopControl”控件。我认为“FocusControl”是相同的,但事实并非如此。

我发现它几乎不存在,不仅对于 Series 40(仅限某些手机),而且(更令人惊讶的是)对于 Series 60 和 Symbian 3。

您可以在 诺基亚设备上的 Java ME API 支持

这些手机支持 JSR-234,但支持音频和音乐,不支持相机。

你可以想象,这是非常具有欺骗性的,诺基亚没有做好他们的工作。

你找到解决办法了吗?也许是另一个“手工制作”的控件?恐怕我必须开始用 C++ 编程,因为我没有太多时间。

I am developing a Java ME application which uses the camera to take a snapshot and then decodes it (using ZXing library). The target is Nokia phones.

I need to use the focus to have a clear image, if not, it is difficult to decode the image.

Since the Series 40, the control "videocontrol" and "SnapShopControl" are available. I thought that for the "FocusControl" it was the same, but it isn't.

I discovered that it is almost non-existent, not only for the Series 40 (only some phones), but (more surprisingly) for the Series 60 and Symbian 3.

You can see that in Java ME API support on Nokia devices.

These mobile phones support JSR-234 but for audio and music, not for camera.

As you can imagine, this is very deceiving, Nokia is not doing their work well.

Did you find any solution? Perhaps another "made-by-hand" control? I am afraid I have to start programming in C++ because I haven't got much time.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

倾城花音 2024-09-23 20:03:53

解决方案是使用诺基亚的 APIBridge(一种可扩展的机制来访问WRT、Flash Lite 和 Java 应用程序中的设备功能)。您可以访问手机中安装的相机软件,如果它能够使用自动对焦,您就可以使用它,它会返回您拍摄的图像。

请参阅APIBridge 工具详细信息了解更多详细信息。

实施很简单(您在设备中安装 APIBridge 的 SIS 文件,您可以将您的应用程序和此 SIS 文件打包在一起)。

您使用以下代码:

    APIBridge  bridge = APIBridge.getInstance();
    bridge.Initialize(midlet);
    NewFileService service = (NewFileService) bridge.createService("service.newfileservice");
    Hashtable filter = new Hashtable();
    filter.put("NewFileType", "Image");
  BridgeResult  res= service.TakePhoto(filter);

The solution has been to use Nokia's APIBridge (an extensible mechanism to access device features in WRT, Flash Lite, and Java applications). You can access the software is installed in the phone for the camera and if it is able to use the autofocus, you can use it, and it returns the image you take.

See Tool details for APIBridge for further details.

The implementation is easy (you install the SIS file for the APIBridge in the device, and you can package your application and this SIS file together).

You use the following code:

    APIBridge  bridge = APIBridge.getInstance();
    bridge.Initialize(midlet);
    NewFileService service = (NewFileService) bridge.createService("service.newfileservice");
    Hashtable filter = new Hashtable();
    filter.put("NewFileType", "Image");
  BridgeResult  res= service.TakePhoto(filter);
转角预定愛 2024-09-23 20:03:53

许多手机的硬件不支持焦点。某些索尼爱立信手机(例如 G502)支持 FocusControl,但它们不支持允许做任何事情,因为硬件不支持它。

恐怕您在 Java ME 中可能对这个问题无能为力。

如果手机支持焦点控制,但在 Java ME 中不可用,可能有两种方法可以解决它:

  • 让用户使用内置相机并从相册加载它(最好是最后一张照片)。
  • 尝试使用 S60 API 中的相机对焦。

请注意,我不是 S60 开发人员。

Many phones' hardware just don't support focus. Some Sony Ericsson phones (e.g. G502) support FocusControl, but they don't allow to do anything because the hardware does not support it.

I'm afraid to say that you can do probably nothing with this problem in Java ME.

If the phones support focus control, but it is not availble in Java ME, there are probably two ways how to solve it:

  • Let user to use the builtin camera and load it (preferably the last photo) from Camera album.
  • Try to use camera focus from a S60 API.

Note that I'm not a S60 developer.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文