android - 将 getExternalFilesDir 与多个 SDCard (Galaxy S3) 一起使用

标签 android

对于 Android 4.4.2,我必须更改 Environment.getExternalStorageDirectory() 以使用 context.getExternalFilesDir(null)

这在 4.4.2 模拟器和我的 Galaxy S3 上工作得很好,但在 Galaxy S3 上它使用的是内部存储器而不是 SDCard

我用 ( How can I get external SD card path for Android 4.0+? ) 回答 18 来找到 SDCard

在 Galaxy S3 上是否有任何地方可以结合 getExternalFilesDir() 和 Galaxy S3 来解决这个问题

谢谢

最佳答案

This works perfectly fine on 4.4.2 Emulator and my Galaxy S3 but on the Galaxy S3 it is using the internal memory and not the SDCard

它在模拟器和 Galaxy S3 上都使用外部存储。我刚刚完成了一个解释什么的博文系列 internal storage , external storage , 和 removable storage在 Android 中都是真正的意思。

Is there anywhere round this issue on the Galaxy S3 with combining getExternalFilesDir() and the Galaxy S3

欢迎您在 Android 4.4+ 上使用 getExternalFilesDirs()(注意复数形式)。如果阵列有多个条目,则第二个和后续条目将位于可移动媒体(SD 卡、USB 存储等)上。

关于android - 将 getExternalFilesDir 与多个 SDCard (Galaxy S3) 一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23205389/

相关文章:

android - java.lang.IllegalStateException : failed to analyze: com. sun.tools.javac.util.ClientCodeException : java. lang.NullPointerException 异常

java - 如何给 EditText 添加下划线

android - Android AudioRecording失去了音频的最后几秒钟

java - 膨胀类 com.android.internal.widget.ActionBarContainer 时出错

android - 声音 webRTC android 中的回声和噪音

Android 支持兼容错误

Android 支持设计 float 操作按钮高度对于白色以外的颜色不可见

android - Ping 应用程序动画 Android

android - blender 和 Vuforia

android - 如何将 Android SeekBar 设置为不可移动/卡住?