SecrecySupportTeam / secrecy

http://forum.xda-developers.com/showthread.php?t=2704486
Apache License 2.0
78 stars 27 forks source link

Custom File Chooser Implementation for SDcard location choosing #138

Open Doplgangr opened 9 years ago

Doplgangr commented 9 years ago

This pull request implements a new file chooser.

Since there is still no definite solution to the external SDCard problem we are facing, I am thinking about solving it in a more generic manner.

Problem:

L-Henke commented 9 years ago

But I don't think this solves the general problem. The main problem is not selecting the folder. With Android >= 4.4, access to all files and folders on an sd card is permitted, and can only be granted to the app by a special intent. This also hasn't been solved in my PR. Or am I missing something? See this comment from an Google developer: https://groups.google.com/forum/#!msg/android-platform/14VUiIgwUjY/UsxMYwu02z0J

Or am I missing something? Sadly I can't just test it, because I have no device with an external sd card (only the emulator)...

Doplgangr commented 9 years ago

See this line: "Before KitKat, some OEMs chose to leave external storage devices unprotected, where apps could write if they guessed a special filesystem path."

This solution is just for before kitkat, where the file access is not limited provided that you can find the path to the specific directory you want. Since after kitkat access to all files need special intents as you mentioned, we need to use the storage access framework you implement.

I am aiming to create a fallback solution for before kitkat that cannot use the framework.

L-Henke commented 9 years ago

Ok. That sounds reasonable. I'll keep watching this PR.

Doplgangr commented 9 years ago

Ready for review.

minusdavid commented 7 years ago

I'm keen for this problem to be solved, and I have devices with external SD cards. Happy to take a look at this when I have some time. Maybe later in the week.