Get the bluetooth storage folder on Android device

為{幸葍}努か 提交于 2020-01-15 19:17:13

问题


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?

Thanks.

Santi.


回答1:


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.



来源:https://stackoverflow.com/questions/6125993/get-the-bluetooth-storage-folder-on-android-device

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!