开发者

Android showing results of the query to the server

I develop app 开发者_如何学JAVAwhich will download information from Internet server and show search results in ListView. When user clicks on item more detailed information will be shown. The question is whether to write search results before showing to DB or not? I know that Activity lifecycle can loose all data and some developers recomend to do it safe, but is it really necessary?


Yes, it makes sense to persist the data because if the activity is destroyed and you lose the data while the user has switched to instant messenger or mailer, the user will have to re-download the data from the server, which causes extra traffic and potentially money loss. Also it doesn't necessarily need to be a DB - you can just use some temporary file. But you do need to persist this data.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜