Write to SD card on KitKat
Your FAQ says it's impossible on KitKat but, if I've understood you correctly, is not! Use Environment.getExternalStorageDirectory() (orgetExternalStoragePublicDirectory()), add the appropriate permission to the Manifest et voila!
Please read more carefully… It doesn’t say the app cannot write on the sd card. It says the app can only write in its own folder and that you just need to select this folder
-
@H Please contact me in case of an issue so I can help (Settings/Feedback)
It looks like your SD card is corrupted. Please analyze/repair it using a computer to fix the issue
Thanks -
H commented
I agree the same problem as Jay below. Have been saving podcasts to SD card fine for a year, but it stopped working a could of days ago and gives that error message. Have tried restarting phone and reinserting SD card but no luck. Am using Android 5.1.1
-
@jay podcastaddict@gmail.com
Thanks -
Jay commented
I dont know how to email you. I asked how to earlier.
-
@Jay
If rebooting the device doesn't fix the issue, then it means that the SD card is corrupted. In that case you need to analyze/repair it using a computer.
Please send me an email instead of posting here.
Thanks
-
Jay commented
Xavier G, thank you.... where do I send email questions?
The point is, I HAVE been saving to the SD card by selecting SD card in the app Settings/Download/Storage folder screen, and it worked great until yesterday.... now when I try to download a podcast, I get an error saying
"Failed to download... It looks like the selected Storage location might be in an unauthorized SDCard folder. Make sure to follow the FAQs instructions (Settings/FAQs)"I'm not doing anything differently, but all of a sudden I'm not able to download to my SD Card.
-
@Jay
Please send me an email in case you have a question so I can help (Settings/Feedback)
In order to save your downloaded files on the SD card you just have to select SD card in the app Settings/Download/Storage folder screen.
No need to select any folder. Android will store those files in the app folder within the SD card -
Jay commented
I'm sorry, I still do not understand at all. Are you saying the app now cannot save podcasts to
/storage/sdcard1/Android/data/com.bambuna.podcastaddict/files ?
Well then how do I save them to my SD Card? I tried creating a new folder on the card but it won't let me.
This wording is very unclear: "Android apps can still read SD card data, but they can only write data in a their own SD Card dedicated folder. If you want to store your downloaded episodes on the SD Card, make sure to go into Settings/Download/Storage location and to select the SD Card radio button."
My only storage locations listed in Settings are 'Internal Memory' and 'Removable SD Card'. -
No you cannot do it on non rooted device. There are some security loopholes that might allow to write in different folder but they will be fixed.
Now that permission has been removed to write outside the app folder on SD card why do you want to do it ?
BTW getExternalStorageDirectory doesn't give you access to the sd card, but to the external memory which isn't the same. Until android 4.4, android only supported internal and external memory but not removable SD card.
Only API 19 getExternalFilesDirs() can give you access to removable SD card path -
Henry S commented
Thanks, I did read it and that's my point. You CAN read/write outside your own folder. I implemented this on 4.4.2 myself today; I create a directory on the root of the sd card and store files there.
The segregated directories are great for keeping apps separate but you *can* access outside if you want to. It makes a way better UX :)
-
Henry S commented
Should say this lets you write outside of the nasty sdcard/data/com..... path :)