开发者

How to store the "lastBuildDate" of an RSS feed

I'm develloping an android application that has a local database which synchronizes whith an online RSS.

The issue i'm encountering is the follwoing: i want to store the "lastBuildDate" of the RSS feed (i already have the date in a string ready to store) but i don't know which is the best way to store this date even after the application got closed.

I'm thinking of creating a new database whith just the lastBuildDate in but this sounds a bit weird to me, so i figured there might be a better more suitable solution to store just this one string so that i c开发者_C百科an access it later.

So is there a way to store it in the application (like preferences?) or should i eventualy create a database or file to store the date in?

Regards


You should just create a SharedPreference value for that case. Im sure you are smart enough to implement :)

SharedPreferences sp= this.getSharedPreferences("sharedP", MODE_PRIVATE);
SharedPreferences.Editor editor = sp.edit();
editor.putString("lastBuild", date);
editor.commit();
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜