黑莓相机应用 [英] blackberry camera Application

查看:244
本文介绍了黑莓相机应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我实现相机应用程序使用然后示例自带的黑莓插件eclipse命名为CameraDemo的问题是,当屏幕失去焦点它不显示相机视图istead它显示像这样


I am implementing camera application using then example comes with blackberry plugin for eclipse named "CameraDemo" the problem is that when the screen loses focus It does not display the camera view istead of it shows like this



有任何人遇到这种问题的解决方案吗?


has anybody faced such problem whats the solution?

推荐答案

这种拍照方式(使用 Player VideoControl.getSnapshot ())不能在所有BB模型上正常工作。我甚至说它只适用于一个狭窄的BB模型集。因此,如果你要在各种BB型号上使用你的应用程序,那么这不是正确的方法。

This way of taking picture (using the Player and VideoControl.getSnapshot()) does not work nice on all BB models. I'd even say it works nice only on a narrow set of BB models. So if you are going to use your app on a wide range of BB models, then this is not the right way to go.

而不是拍照,相机应用程序。 在这里是如何做的一个起点。

Instead to take a picture use a built-in Camera app. Here is a starting point on how to do that.

基本上,您调用内置的相机应用程序,并侦听文件系统更改以检测新的图像文件路径。然后,你需要关闭内置的相机应用程序的某种方式 - 这可以通过模拟两个Esc按钮按钮。

Basically you invoke the built-in Camera app and listen for the file-system changes to detect a new image file path. Then you need to close the built-in Camera app somehow - it's possible to do that by simulating two 'Esc' button presses.

是的,这听起来有点hacky /过于复杂,但是这是BB工程师为我们安排的。 :) BTW,这实际上不是那么糟糕,如果与Android不同的设备制造商违反了通用规则,并以特定的方式实现相机应用程序,所以你不能够编写代码一次覆盖所有Androids。

Yes, this sounds a bit hacky/over-complicated, but that's how BB engeneers arranged that for us. :) BTW, this is actually not so bad if compare with Android where different device manufactorers violate the common rules and implement the Camera app in their specific way so you are not able to write the code once covering all Androids.

这篇关于黑莓相机应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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