murraycu / android-galaxyzoo

This Android app lets you classify Galaxy Zoo subjects. It is available in the Google Play Store: https://play.google.com/store/apps/details?id=com.murrayc.galaxyzoo.app . Try beta versions early here: https://play.google.com/apps/testing/com.murrayc.galaxyzoo.app . See also the iPhone app for Galaxy Zoo: https://github.com/murraycu/ios-galaxyzoo/
GNU General Public License v3.0
11 stars 13 forks source link

Android Lollipop needs WRITE_EXTERNAL_STORAGE but it shouldn't. #5

Open murraycu opened 9 years ago

murraycu commented 9 years ago

Android Lollipop throws IOExceptions when reading or writing from the getExternalFilesCacheDir() directory unless we request WRITE_EXTERNAL_STORAGE permission (and READ_EXTERNAL_STORAGE, which is then implicitly requested). But that shouldn't be necessary since API 18: http://developer.android.com/reference/android/Manifest.permission.html#WRITE_EXTERNAL_STORAGE

This commit requests the permission, but it shouldn't be necessary: https://github.com/murraycu/android-galaxyzoo/commit/75aa986879a4f08d19c1f43f5d95a5c2fd5e2836

I asked this on StackExchange too: http://stackoverflow.com/questions/27016647/why-do-i-need-the-write-external-storage-permission-with-getexternalcachedir-o?sgp=2