开发者

android listitem from server and stores data to database

i'm trying to do mail program. i've done this using jsonArray, Http protocals and some other functions. But, now i want to implement the program likely unread mails and starred mails. If i'm pressing anyof new mail it'll assign likely 1 to database. Otherwise, keep it 0. And, also if i want to set any mails in important (starred) this will keep 1 to database. Otherwise, keep 0. Now, i want to create a database related to these concepts? Anyone know about this concept Please help me to do this? Th开发者_运维知识库anks in advance.


Use SQLite,

Below tutorial will help you to get started,

http://developer.android.com/guide/topics/data/data-storage.html#db

http://www.vogella.de/articles/AndroidSQLite/article.html#overview_sqlite

Good luck!

Edited :

Create a database with a table "Whatever name"

Than have content such as

|SeqNo|MailFrom|MailTo|Subject|Body|Starred|etc...|

Example

|1|blah@clah.com|blahblah@blah.com|Hi|Hello|0|etc...|
|2|bla1@clah.com|blahbfgv@blah.com|Hi|Hello|1|etc...|

Hope you can match example with given table format, It's like a simple SQL database where you can query while loading inbox and check whether user has selected a mail and starred it! However you can create those star button which will change state of that table's column while being click.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜