ByLinky Johnson 2019-05-25 1569
Today when an Android application wants to write information about the storage space, there are several choices available to it. In order to make a decision, the question any Android developer has to ask is about the confidentiality of the data: is this information public (and therefore shareable) or should it remain confined to the application?
For simplicity, each application has its own directory in which it can store any type of data privately and securely. She is the only one who can access it, whether in reading or writing. For all operations on this directory, no permission is requested from the user.
This place is therefore ideal for storing preferences and other user data. In addition, this directory has the advantage that if the application comes to be uninstalled, all files will be destroyed with it.
On the other hand, there is a vast public folder in which you find your photos, music, downloads ... It is also this space that is displayed when you connect a phone to a computer. This directory is therefore particularly useful for information that applications are made to share (eg take a photo with a camera application and use it later with another).
Several restrictions are to know:
● It is strongly discouraged to store sensitive or personal information;
● When uninstalling an application, the data is retained;
● Access to this space requires the validation of a permission by the user for reading and / or writing.
Although these two spaces are partitioned, there are some exceptions:
● A file stored on the personal space can be shared under certain conditions with another application (eg take a photo with the Camera application and then send it on Facebook without appearing on the public folder)
● Applications from the same developer can share access to their home directory
● This system has changed little since the first version of Android, thanks to a sandboxing system (sandbox) particularly effective.
However, it relies on the good judgment of the developers as to the qualification of the type of data.
Scoped Storage: the public space much more limited
If we were to summarize the next version of Android, the notion of privacy would be the most appropriate definition. The access to the files will not derogate there and will be more strict as for the public storage space only. While today applications can freely explore the inside of the folder, regardless of the content, Android Q will allow more than a limited view.
Note, however, that access to files through your computer will remain unchanged. Scoped Storage is only a restriction set up for applications.
On the one hand, it will no longer be possible to access a file directly (example: /sdcard/Music/SalutCestCool.mp3). On the other hand, only files of type photos, videos or music that have been recorded in a large database called the MediaStore will be accessible without user intervention.
Until now, the applications could freely consult the EXIF data of the photos, which notably contain the geolocation of the snapshot. On Android Q, it will only be possible to obtain this information once the user has validated the permission.
For other types of files, such as downloads (ex: /sdcard/Downloads/MonSuperDoc.pdf), applications will have to let the user choose the item using the Android file manager. They will not be able anymore as today to do it automatically in the background. The use of the file manager will multiply.
On Android Q, applications will have less access to all of your public files. Depending on the type, the opening mechanism will be different, but in return will give greater visibility to the manipulated data. On the other hand, all this system will weigh down the navigation, since what was transparent yesterday will be the responsibility of the user tomorrow.
With this limited view on public files, one can then wonder if file manager applications will always make sense on Android Q.
After observing an outcry of developers, Google has made the necessary to provide an alternative and allow applications to access as today to a directory and its files. For this, it will be necessary for the user to authorize access to the said directory ("Allow access to" button on the screenshot above).
Rest assured, a bing-bang will not take place when your phone will switch this summer on Android Q. Indeed, this new system will not come into effect in the following cases:
If an application uses the Android Q APIs, but indicates that it is incompatible with Scoped Storage.
This solution is however only temporary, because Google has announced that from Android R, the entire ecosystem will have to comply with this mechanism.
|You may also want to read:|
|Android Q: Google will probably replace the back button with a gesture - so it can be activated|
|Google 2019 Preview: Android Q|
|Android Q: Google tests Swipe Back gesture in the style of iPhone X navigation|