About android file storage

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/boatImpish/article/details/89352234

About android file storage

In the external storage device is the best location to store files Context.getExternalFilesDir () returns the position, because the behavior of this location are consistent across all Android versions. When using this method, pass the file corresponding to the type you want to create or open in the media environment. For example, to access applications or saving private pictures, please call Context.getExternalFilesDir (Environment.DIRECTORY_PICTURES).
Above this is the android developer to develop the Chinese original document, I find it particularly interesting. Portal
android stored into the internal storage and external storage, respectively internal and external. This moment, a single application of media storage have a landing path, the next step is naming a single file. With these you can get through the stream files, the various operations, such as copying, network transmission and so on.
Universal Media collection: photos, videos, music, downloads. The purpose is to save the user's files when you delete the application.

android Q

Android Q in the external storage device provides a "sandbox isolated storage" (e.g., / sdcard) for each application. Any other application can not directly access the sandbox file your application. Since the file is a private file your application, so you do not need any permissions to access and save their files in an external storage device. This change will make it easier to ensure the privacy of user files, and helps reduce the number of permissions required by the application.
Note: If you uninstall your application, the system will clean up the file storage isolated sandbox.
This is also the development of the document. After listening to this description, I think quite early to spend android Q to see in the end is what kind of file directory, because I feel android file directory has been very confusing. Various app, various directories bluffing a little, mess.

Photo location information, also manage up before the sun to see other people's photos are all time and place of the weather and so forth, that's cool. I feel very high-end, information express it's more than just photos. Under normal circumstances, to obtain information in the photo, it requires two steps:

  • 1, the new ACCESS_MEDIA_LOCATION permission to add to the list of applications.

  • 2, in MediaStore object, call setRequireOriginal () and pass the pictures URI.

When directly to the Android 9 do not fit the app is installed directly onto the android Q, if your application declares tagged ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION, the system automatically during installation ACCESS_BACKGROUND_LOCATION add tags. android app development android development is really just the tip of the iceberg ah. The system is also involved in a lot, android future is promising.

How to access other files created by the application

  • 1, request permission.

  • 2, ContentResolver objects to find and open the file. (The ContentResolver new class contains a method loadThumbnail (), provides for the application file preview.)

android Q basically modifications are focused on the rights, privacy is really important. How no sense of it before this! ! ! Really strong feelings! Technology is serving others.
Only a sucker would ask their industry has no prospects.

In improving call quality, and finally saw, IMS content of this piece, my project is to use this technology inside. IP Multimedia Subsystem, used for media transmission. doubango

new book mark

I suddenly have a thief good idea! Before I especially like to go to the movies, every time I watched the film will receive a ticket stub to use as bookmarks, book to see where to clip where. Recently rarely go to the movies, too expensive. But every time I go grocery shopping, there will be a receipt, put this as a bookmark I think it is quite good. Yes, bigwigs can try.

Guess you like

Origin blog.csdn.net/boatImpish/article/details/89352234