从Android平板电脑访问USB USB闪盘 [英] Accessing USB Pendrive from android tablet

查看:238
本文介绍了从Android平板电脑访问USB USB闪盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经在我们的Andr​​oid平板电脑的USB端口(4.0.3版本)。

We have a usb port in our android tablet(version 4.0.3).


  1. 我们如何找出任何随身碟连接该端口上还是不行。

  2. 我们如何访问这些文件中,连接该端口通过编程android系统中的USB USB闪盘。

我们有一个的/ mnt 包含的文件夹

We have a /mnt contained Folder as

ASEC
extsd
OBB
SD卡
安全
usbhost1


  1. 如何以编程方式确定哪一个是内置存储器路径外置SD卡路径 USB路径

什么是使用该文件夹的目的 ASEC OBB 安全

What is the purpose for used this folder asec, obb and secure.

先谢谢了。

问候
巴拉

推荐答案

我想用你需要使用这个外部SD卡:

I guess to use the external sdcard you need to use this:

new File("/mnt/external_sd/")

new File("/mnt/extSdCard/")

new File("/mnt/usb_storage")

在Environment.getExternalStorageDirectory的替换()

in replace of Environment.getExternalStorageDirectory()

我的作品。您应该检查什么目录MNT第一和工作从那里..

Works for me. You should check whats in the directory mnt first and work from there..

您应该使用某种类型的选择方法,选择要使用的SD卡:

You should use some type of selection method to choose which sdcard to use:

File storageDir = new File("/mnt/");
if(storageDir.isDirectory()){
    String[] dirList = storageDir.list();
    //TODO some type of selecton method?
}

在笔式驱动器位于的/ mnt /(就像在4.0所有其他存储设备>)

The "pen drive" is located in /mnt/ (just like all other storage devices in 4.0>)

这将可能是某些设备的不同,对于宏碁Iconia A500运行4.0.3 USB存储正在的/ mnt / usb_storage /

It will probably be different for some devices, for the Acer Iconia A500 running 4.0.3 usb storage is under /mnt/usb_storage/

这篇关于从Android平板电脑访问USB USB闪盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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