It's best to be explicit and declare both permissions, but declaring only android.permission.WRITE_EXTERNAL_STORAGE
will automatically add android.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:
uses-permission:'android.permission.WRITE_EXTERNAL_STORAGE'
uses-permission:'android.permission.READ_EXTERNAL_STORAGE'
uses-implied-permission:'android.permission.READ_EXTERNAL_STORAGE',
'requested WRITE_EXTERNAL_STORAGE'
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…