android-external-storage

Universal way to write to external SD card on Android

橙三吉。 提交于 2019-11-26 04:32:05
问题 In my application, I need to store lots of images in the device storage. Such files tend to fulfill the device storage, and I want to allow users to be able to choose external SD card as the destination folder. I read everywhere that Android doesn\'t allow users to write to external SD card, by SD card I mean the external and mountable SD card and not the external storage , but file manager applications manage to write to External SD on all Android versions. What is the better way to grant

READ_EXTERNAL_STORAGE permission for Android

假如想象 提交于 2019-11-26 02:52:53
问题 I\'m trying to access media files (music) on the users device to play them; an easy \"hello world\"-music player app. I\'ve followed some tutorials and they basically give the same code. But it won\'t work; it keeps crashing and telling me: error..... Caused by: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/audio/media from pid=27696, uid=10059 requires android.permission.READ_EXTERNAL_STORAGE, or