Google last year introduced Storage Access Framework (SAF) with Android 4.4 KitKat that allowed third-party apps to get access to files with the user's consent for total SD card access to an app.
The method however didn't sort out all the problems related to the storage in case of apps that dealt with media files (images and video) and required more space to store files on to the microSD cards.
Now, Google has introduced new APIs in Android 5.0 Lollipop to allow full directory access, automatic media store and even improve security.
With the new improved APIs, developers will have full access to SD card directories and files with only one consent of the user and the apps will be able to create directories for storage on an external storage card in a more sorted way than KitKat.
Android developer site notes, "Android 5.0 extends the Storage Access Framework to let users select an entire directory subtree, giving apps read/write access to all contained documents without requiring user confirmation for each item. Android 5.0 also introduces new package-specific directories on shared storage where your app can place media files for inclusion in MediaStore"
Google's Jeff Sharkey details the improved APIs in Android 5.0 Lollipop in a Google+ post, "In KitKat we introduced APIs that let apps read/write file in app-specific directories on secondary storage devices, such as SD cards. We heard loud and clear that developers wanted richer access beyond these directories, so in Lollipop we added the new ACTION_OPEN_DOCUMENT_TREE intent. Apps can launch this intent to pick and return a directory from any supported DocumentProvider, including any of the shared storage supported by the device. Apps can then create, update, and delete files and directories anywhere under the picked tree without any additional user interaction. Just like the other document intents, apps can persist this access across reboots."
Dianne Hackborn of Google (Android Framework) further adds, "Also worth noting is the new getExternalMediaDirs() method that gives you a place for your own files on any available secondary storage, without needing to request read/write."