如何从我的应用程序存储数据 [英] How to store data from my app

查看:129
本文介绍了如何从我的应用程序存储数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

其实我想知道如何从我的应用程序存储在设备中的数据,这样我可以查看存储数据,当我再次运行应用程序。

Actually i want to know how to store data from my app in the device so that i can review the store data when i run the application again..

意味着简单来说我想说的是,假如我有我的地方写一些information..now文本框中当我点击提交按钮,此信息将保存,这样,当我打开应用程序存储的数据应该是出现在文本框中。

means in simple terms i want to say that suppose i have text box where i write some information..now when i click the submit button, this information will be save,so that when i open the application the stored data should be appear in the text box..

在我想说的是,我只是想,我们正在使用的数据库,用于存储data..so请任何人都建议我怎么可以在安卓做的方式存储数据的所有条款。

In all terms i want to say that i just want to stored data in the way that we are using database for storing data..so please anyone suggest me how that can be done in android.

如果可能的展示用一个例子

if possible show with an example

问候 Anshuman

Regards Anshuman

推荐答案

如果您有存储数据量小,可以使用共享preferences Android中

If you have to store small amount of data, you can use SharedPreferences in Android.

如果您有存储的数据大/复杂的是,尝试使用的SQLite 数据库。

If the data that you have to store is big/complex enough, try using SQLite database.

仍然需要帮助?

更新:有一个教程,我写信给演示如何使用 SQLite数据库。检查出来这里。虽然复制现有的数据库到设备的内存,但其他版本的它,它通过创建code数据库也可以从它设计出来。

UPDATE: There's a tutorial that I wrote to demonstrate how to use SQLite database. check it out here. Although it copies existing database into device's memory, but other versions of it, which create database through code can also be devised from it.

这篇关于如何从我的应用程序存储数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆