获取Android设备上的蓝牙存储文件夹

问题描述:

我要设置蓝牙文件夹FileObserver。我的问题是,这个文件夹根据设备的不同,例如在银河S是MNT / SD卡/蓝牙,并在欲望是MNT / SD卡/下载/蓝牙。有没有什么办法让编程该文件夹以能够做到应用设备independient?

I want to set a FileObserver in the bluetooth folder. My problem is that this folder is different depending on the device, for example in Galaxy S is "mnt/sdcard/bluetooth" and in the Desire is "mnt/sdcard/downloads/bluetooth". Is there any way to get programatically that folder to be able to do the application device independient?

感谢。

桑蒂。

检查此方法: getExternalFilesDir(字符串类型)。并使用 DIRECTORY_DOWNLOADS 的类型。

Check this method: getExternalFilesDir(String type). And use DIRECTORY_DOWNLOADS as type.

如果您的蓝牙添加到年底你会得到蓝牙下载目录。

If you add "bluetooth" to the end you'll get the bluetooth download directory.