问题标签 [usb-otg]
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.
android - 在 Android 中通过 OTG 电缆使用连接的 USB 播放视频?
我想问有没有应用程序,用户可以通过 OTG 电缆设备将 USB 连接到 Android 并播放它包含的媒体(特别是视频)。
我制作了一个广播接收器来检测连接的 USB,我也想阅读内容。我正在使用这个代码片段。
我想做这样的申请。
有人对此有什么想法吗?
android - 记住 Android 5.0 上的 USB 权限
我有一个使用 OTG 连接连接到 USB 设备的 android 应用程序。插入设备时,它会显示一个弹出窗口,您可以在其中选择允许和一个复选框,您可以在其中记住此决定。我遇到了一个它不记得权限的问题,如本主题中所述:
主题中给出的解决方案完美地解决了我安装了 android 4.4.4 的 Moto G 的问题。作为副作用,只要记住权限,它就会在应用程序未打开并且连接设备时启动应用程序,这很酷!
但是,当我在我的 Sony Xperia Z1 Compact 上使用 android 5.0.2 尝试相同的操作时,它不记得我的偏好,应用程序也不会自动启动,并且每次应用程序请求权限时都会弹出对话框。所以看起来记住复选框不起作用!
我的清单中的活动:
配置.xml:
所以要清楚;这在我的 4.4.4 手机上按预期工作,但在我的 5.0.2 手机上不起作用。对我来说,这似乎是一个与 android 5 相关的问题,权限可能会有所不同。这是否可以在我的清单中以某种方式修复?
android - How to get the file path from a device acting as a usb mass storage in android
I am trying to get filenames(and also the filepath), from a Garmin device which acts as a usb mass storage. Connecting the device to the computer, the filepath is G:\Garmin. Connecting that to the android tablet using OTG and Explorer(i have check the app setting - the package name is : com.android.rk), the filepath is USB/Garmin. Using ES File Explorer, I have seen that the file path is mnt/usb_storage/Garmin. So in the code, as I am trying to parse the system.xml from the file path usb_storage/Garmin, I have put the filepath like this:
When I run the app, it crashes, meaning that it cannot find the file system.xml. Is it right that I use Environment.getExternalStorageDirectory() when I'm looking for the file in a usb device connected via OTG? Can you please point me to what should be done? Thank you so much.
java - Transfer Files USB Mass Storage OTG
I have an external mass storage device connected to an Android device. There are several .BIN files in the root directory that I need to read into my app. I am able to connect to the device and receive usb permission using UsbDeviceConnection.
Once I'm connected I am able to see that I have one Mass Storage interface with 2 Bulk Transfer endpoints (one in, one out).
When using usbConnection.bulkTransfer I receive -1 back and an empty buffer. So, I'm having trouble receiving data. Once past that hurdle, what will the data look like? How do I continue to pull all of the files from the device? Is there a way to transfer the data file by file to my app? Is there an all together better way of approaching this?
android - 在 Android 上通过 USB 主机模式访问相机存储
我正在尝试使用我的 OTG 电缆通过 USB 主机访问我的 DSLR 上的 SD 卡。我相信这是通过 PTP 实现的。我见过几个应用程序也可以在没有 root 权限的情况下执行此操作,他们不仅可以访问它,还可以控制快门速度和其他东西。但我只对访问 DSLR 上的 SD 卡感兴趣。连接到 USB 设备后我卡住了。见附件代码
有人可以告诉我如何阅读然后最终将照片从 DSLR 的 SD 卡下载到我的 android 应用程序。
更新
所以我尝试了这个库https://github.com/mjdev/libaums
它很棒,但问题是它只支持 USB 大容量存储。它不会识别我的相机存储。
任何帮助表示赞赏。
android - 使用 mount 命令在 SnapdragonAPQ8074 中安装 USB 驱动器
我用root登录并将usb3.0连接到snapdragon板的usb3.0端口,当我检查日志时检测到:
并尝试使用以下命令安装它:
它显示错误:'安装:没有这样的设备'
android - How to check whether Android device supports OTG features programatically
I want to check whether a device supports OTG features programatically . I have tried a lot about this in Internet but could not find any thing .
How can I do that ?
android - 如何在 android 的 OTG 上使用相机
我正在开发一个必须同时使用两个外部摄像头的 android 应用程序。我想知道如何使用相机。我经历了许多其他答案,但不清楚。我想知道如何在android中使用相机