Android WRITE_EXTERNAL_STORAGE permission requires app restart - EACCES (Permission denied)

Currently working to implement new Android 6.0 (Marshmallow) run-time permission model for one my apps. During testing on the emulator I found quite annoying bug. When user grants WRITE_EXTERNAL_STORAGE on-demand permission, the app still cannot write (nor read) from external storage. For permission changes to take affect you have to kill and restart the app.

Found a related bug reported on android-developer-preview. It was for a Developer Preview release and the case was closed since Marshmallow has been released publicly....

Read more: Android WRITE_EXTERNAL_STORAGE permission requires app restart - EACCES (Permission denied)

Uploading existing Android Studio project to SVN (Subversion)

I develop few Android apps during my spare time and until now I have been syncing project folders between my Synology NAS and PCs/Laptops using excellent Beyond Compare. Finally, I decided to get a bit more sophisticated and started using Subversion (SVN) to sync and track my dev projects.

It's been quite some time since I last used SVN, so this may not be the most efficient way to set everything up, but here it is:

  1. Install SVN Server. You can choose any flavour you want. In my particular case I used Synology NAS version.


    Read more: Uploading existing Android Studio project to SVN (Subversion)

Android Studio automatically adds Contacts permission

After updating my Fuel Log app to take advantage of Android 6.0 (Marshmallow) run-time permissions, I noticed that app's permission page (Settings > Apps > [app name] > Permissions) contains Contacts permission that is not present AndroidManifest.xml (nor anywhere else within my app).

Read more: Android Studio automatically adds Contacts permission

Unable to find optional library - org.apache.http.legacy

Android Studio suddenly (and for no apparent reason) started complaining that it could not find org.apache.http.legacy (which was added to build.gradle as a legacy library).

Warning: Unable to find optional library: org.apache.http.legacy

The issue was caused by a missing optional.json file that was supposed to be located in Android SDK folder ...AndroidSDK\platforms\android-23\optional

Read more: Unable to find optional library - org.apache.http.legacy

Newsletter

Subscribe to receive occasional updates on new posts.
Your email will not be used for any other purpose and you can unsubscribe at any time.
Please wait