获取Android设备上的蓝牙存储文件夹 [英] Get the bluetooth storage folder on Android device

查看:240
本文介绍了获取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?

感谢。

桑蒂。

推荐答案

检查此方法:<一href=\"http://developer.android.com/reference/android/content/Context.html#getExternalFilesDir%28java.lang.String%29\"相对=nofollow> 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.

这篇关于获取Android设备上的蓝牙存储文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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