Android Tutorials - Internal Storage in Android (Part-1).mp4 | Edureka

preview_player
Показать описание

---------------------------------------------------------

Storage in Android :
-----------------------------

Android provides several options for you to save persistent application data. The solution you choose depends on your specific needs, such as whether the data should be private to your application or accessible to other applications (and the user) and how much space your data requires.

These are some data storage options :
--------------------------------------------------------

*Shared Preferences - Store private primitive data in key-value pairs.
*Internal Storage - Store private data on the device memory.
*External Storage - Store public data on the shared external storage.
*SQLite Databases - Store structured data in a private database.

Android provides a way for you to expose even your private data to other applications — with a content provider. A content provider is an optional component that exposes read/write access to your application data, subject to whatever restrictions you want to impose. For more information about using content providers, see the Content Providers documentation.

We will talk about Internal Storage in this tutorial :

Internal Storage :
-------------------------

You can save files directly on the device's internal storage. By default, files saved to the internal storage are private to your application and other applications cannot access them (nor can the user). When the user uninstalls your application, these files are removed.

To create and write a private file to the internal storage:

**Call openFileOutput() with the name of the file and the operating mode. This returns a FileOutputStream.
**Write to the file with write().
**Close the stream with close().

-----------------------------------------------------------

Рекомендации по теме
join shbcf.ru