android中数据持久化方式有哪些
发布网友
发布时间:2022-04-22 06:36
我来回答
共2个回答
热心网友
时间:2024-02-23 09:38
android中数据持久化方式有以下五种:
1、Shared Preferences
Store private primitive data in key-value pairs。
2、Internal Storage
Store private data on the device memory,把数据持久化存储到手机内部存储空间,它主要用于私有数据存储。
3、External Storage
Store public data on the shared external storage,把数据持久化存储到手机外部SD卡中,它主要用于非隐秘数据存储。
4、SQLite Databases
Store structured data in a private database。
5、Network Connection
Store data on the web with your own network server,
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。
热心网友
时间:2024-02-23 09:38
Android数据的四种存储方式SharedPreferences、SQLite、Content Provider和File