使用 Android 智能手机控制外部摄像头
我想编写一个 Android 应用程序来将命令传递到外部摄像头,其 SDK 可从制造商的网站上获取。 SDK 基于 C,相机 I/O 通过 mini-USB 或 mini-HDMI 端口完成。这是一个由两部分组成的问题:
基于 Android 的智能手机能否向外部 USB 设备发送命令?我确实知道他们可以从外部 USB 设备访问数据。
Java 的 C 包装器(可在笔记本电脑上运行)可以在基于 Android 的智能手机上运行吗?
I would like to write an Android app to pass commands to an external camera whose SDK is available from the manufacturer's website. The SDK is C-based and the camera I/O is done through a mini-USB or mini-HDMI ports. This is a two part question:
Can Android-based smartphones send commands to external USB devices? I do know that they can access data from an external USB device.
Will C wrappers for Java (that work on laptops) work on Android-based smartphone?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
答:当然可以,只要设备通过 Android USB 端口连接即可:)
A:通过努力,你可以在android上实现Java和C的接口(类似于其他平台上的JNI)。有关更多详细信息,请参阅 NDK 文档。
答:没有。这不仅仅是一种不同的语言。您还要处理不同的平台、不同的对象格式和完全不同的 CPU 架构。
最好的选择是供应商是否可以为设备提供 USB 级或消息级接口。您对二进制 .dll 或 .lib 库接口非常熟悉。
A: Sure, as long as the device is connected via the Android USB port :)
A: With much effort, you can interface Java and C on android (analogous to JNI on other platforms). Look at the NDK docs for more details.
A: Nope. It's more than just a different language. You're also dealing with a different platform, different object formats, and a completely different CPU architecture.
Your best bet is if the vendor can provide either a USB-level or message-level interface to the device. You're pretty much SOL with a binary .dll or .lib library interface.