Is it enough to declare <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
or do I also have to declare <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
? The Javadocs omit this important information.
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
READ_EXTERNAL_STORAGE
only exists as of Jelly Bean (Level 16). According to the docs, all applications as of Jelly Bean have that permission, even without declaring it:So, you should declare it for future compatibility, but this might not be the source of your problem, unless you're using a Jelly Bean phone and set the developer option "Protect USB storage" option.
It's best to be explicit and declare both permissions, but declaring only
android.permission.WRITE_EXTERNAL_STORAGE
will automatically addandroid.permission.READ_EXTERNAL_STORAGE
to your APK at build time.You can use the command
aapt dump badging
on an APK to see that Android considers usage of the write permission to imply that you also want read permission.Here's some output from aapt for an APK of mine where I declared only
WRITE_EXTERNAL_STORAGE
in my manifest: