无法使用Android应用找到USB设备 [英] Can't find usb devices using Android app

查看:482
本文介绍了无法使用Android应用找到USB设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要在以下设备上运行Android应用直接通过Chromebook 访问访问的USB设备,而不是通过 ARC Welder .

I'm going to run Android app on Chromebook directly to access connected usb devices, not from ARC Welder.

我想使用 ES文件资源管理器访问我的USB设备.

I want to use ES File Explorer to access my usb devices.

插入USB OTG线并在正常的Android设备上运行ES File Explorer,它可以按预期检测到已连接的USB设备.

Plugin a USB OTG wire and run ES File Explorer on normal Android devices, it can detect connected USB devices as expected.

但是,如果我在Chromebook上运行相同的ES File Explorer Android应用程序,它将无法检测到已连接的USB设备.在这种情况下,Chromebook会拦截USB低级数据包.因为我可以使用Chromebook内置的文件资源管理器(这不是Android应用程序)来访问连接的USB设备.

However, if I run the same ES File Explorer Android app on Chromebook, it can not detect connected USB devices. Looks in this case, Chromebook intercepts USB low level data packages. Because I can use Chromebook built-in File Explorer(which is not an Android app) to access connected USB devices.

顺便说一句,我正在使用 USB存储设备进行测试.

By the way, I'm using USB storage to do the test.

所以我的问题是,Android应用程序如何访问Chromebook上已连接的USB设备?当前行为是设计使然吗?将来有什么计划增加对Android应用程序的USB支持?

So my question is, how can an Android app access connected USB devices on Chromebook? Is current behavior by design? Is there any plan to add USB support for Android apps in the future?

推荐答案

基于以下Chromium错误报告:

Based on the following Chromium bug report:

https://bugs.chromium.org/p/chromium/issues/detail?id = 660189

摘要: 看来在ChromeOS(容器ARC)上基于容器的Android应用访问外部/USB存储(读和写)是一个已知问题,似乎已在路线图上,但其他优先事项却没有.

Summary: It appears that access to external/USB storage (read and write) for container based Android Apps on ChromeOS (container ARC) is a known issue, appears to be on the roadmap, but behind other priorities.

更新2017-11-30 :

Chromium团队已在ChromeOS 62(Chromium M-61?)或更高版本上为SD卡实现USB On-The-Go访问.这意味着希望开发人员的应用程序能够像使用手机电池一样使用SD卡的开发人员会感到失望.这是由于以下事实:未将可热插拔" SD卡(例如在Chromebook上找到的SD卡)视为

The Chromium team has implemented USB On-The-Go access for the SD card on ChromeOS 62 (Chromium M-61?) or higher. What this means is that developers who expect their apps to work with the SD card as if it was under the battery in their phone will be disappointed. This is due to the fact that a 'hot swappable' SD card such as those found on a Chromebook isn't considered Adoptable Storage by the Android Framework.

此外,如果您想使用MediaStore API来访问它,那么您仍然不走运,因为Android框架不支持对可移动硬件的访问. Chromium小组意识到并考虑了以下选择:

Additionally if you want to use the MediaStore APIs to access it, you are still out of luck as the Android Framework does not support access to removable hardware. The Chromium team is aware and considering options:

旧问题单: https://bugs .chromium.org/p/chromium/issues/detail?id = 789045& desc = 3

那该怎么办?

使用: Android存储访问框架

可移动存储上查看此Commonware的帖子了解更多详情.

See this Commonware's post on Removable Storage for further details.

更新2019-09-04

ChromeOS 72及更高版本支持Android的MediaStore API,并直接提供"/存储"支持以访问SD卡上的内容.

ChromeOS 72 onward is supporting Android's MediaStore API, and direct '/storage' support for accessing content on SD card.

请参阅: https://bugs.chromium.org/p/chromium/issues/detail?id = 789045#c98

用于支持Android的可采用存储的发行票: https://bugs.chromium.org/p/chromium/issues/detail?id = 917451

Issue ticket for supporting Android's Adoptable Storage: https://bugs.chromium.org/p/chromium/issues/detail?id=917451

这篇关于无法使用Android应用找到USB设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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