有没有办法枚举 Java ME 手机上的视频设备?
我最近为我的手机 LG 条形码读取应用程序下载了/developer.lgmobile.com/lge.mdn.pho.RetrievePhoneInfo.laf?modelName=KU990" rel="nofollow noreferrer">KU990i (又名 Viewty) 但是,有一个问题导致该应用程序几乎无用: Viewty 有 2 个摄像头——主摄像头和位于设备正面的辅助摄像头——不幸的是,辅助摄像头被设置为手机的默认视频捕获设备。由于您无法将辅助设备指向任何物体并同时看到它所指向的内容,因此拍摄条形码有点困难!
根据 JSR-135 规范,可以指定除默认设备之外的视频捕获设备...如果您知道设备名称。 LG 网站上似乎没有记录这一点,JSR-135 规范也没有描述任何枚举手机上设备的方法……或者有吗?如果做不到这一点,LG 可能会使用常用视频设备的命名约定吗?
我已经向 LG 提交了一张罚单,但由于它是一台旧设备,我不认为他们会费尽心思回复我……我还应该指出,这纯粹是出于我自己的好奇心,所以没有人知道这里也应该觉得有必要折断他们的背吧!
I recently downloaded a barcode reading application for my phone, an LG KU990i (AKA the Viewty) However, there's a problem that renders the application nearly useless: the Viewty has 2 cameras -- the main one, and a secondary camera located on the face of the unit -- and it is the secondary camera that is unfortunately set as the phone's default video capture device. As you can't point the secondary at anything and see what it's pointing at at the same time, it makes it a bit difficult to snap a barcode!
According to the JSR-135 spec, it is possible to specify a video capture device other than the default... if you know the device name. This does not appear to be documented anywhere on LG's Web site, nor does the JSR-135 spec describe any way of enumerating the devices on a phone... or is there? Failing that, are there any naming conventions for video devices commonly in use that LG might be using?
I've logged a ticket with LG, but as it's an old device, I don't imagine them breaking their backs in getting back to me... I should also point out that this is purely for my own curiosity so no-one here should feel obliged to break their backs either!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
据我所知,没有办法获取所有可用的 catpure:// url 的列表。
我知道的所有网址:
capture://image,
捕获://视频
捕获://devcam0
capture://devcam1
来源:
http://www.forum.nokia.com/info/sw.nokia.com/id/bc00e4ce-7df3-4527-962c-d39843a808d0/MIDP_Mobile_Media_API_Support_In_Nokia_Devices_v1_0_en.pdf.html
As far as I know there is no way to get list of all available catpure:// urls.
All urls I know:
capture://image,
capture://video
capture://devcam0
capture://devcam1
Source:
http://www.forum.nokia.com/info/sw.nokia.com/id/bc00e4ce-7df3-4527-962c-d39843a808d0/MIDP_Mobile_Media_API_Support_In_Nokia_Devices_v1_0_en.pdf.html
LG 回复了我的支持请求。显然,无法从 Java 访问 Viewty 上的主摄像头,这使得它对于条形码扫描几乎毫无用处。此处转载答案以供搜索引擎使用。
LG responded to my support ticket. Apparently, it's not possible to access the primary camera on the Viewty from Java, making it pretty much useless for barcode scanning. Answer reproduced here for search engines.