如何让SD卡目录中的Andr​​oid PhoneGap的支持JavaScript的完整路径?路径、完整、目录中、Andr

2023-09-07 23:31:26 作者:㈠颗心°为你苦苦守候

我使用PhoneGap的2.8.0的Andr​​oid应用程序。

I am using PhoneGap 2.8.0 for android app.

需要获得使用JavaScript中的PhoneGap,SD卡的完整路径,因为在我的手机就说明了位置文件:/// SD卡/ external_sdcard / ,但在我朋友移动它的展示文件:/// MNT / external_sdcard / ...

Need to get the full path of sdcard using javascript in phonegap, because in my mobile it shows the location as file:///sdcard/external_sdcard/ but in my friend mobile its shows file:///mnt/external_sdcard/...

我的文件夹名称为 App_files 在SD卡

my folder name is App_files in sdcard

推荐答案

最后,我发现,我们不能得到的外置SD卡路径,

Finally i found we can't get the external SD Card Path,

Environment.getExternalStorageState();

它的回报率只有内部SD卡路径

Its returns only Internal SD Card path

参考: http://developer.android.com/reference/android/os/Environment.html#getExternalStorageDirectory()