I am creating an App that will be a database of record album releases. The initial database will contain a history of album releases for the past few years.
I'd like push the data for new album releases to the application each week. How would I go about do开发者_如何学运维ing this without republishing the entire app each week?
Thanks in advance for any help.
I would suggest you need a web service for the update.
Your app can then connect and ask for all changes since its last check (to avoid re-fetching all data) on starting the app.
The new data can be added to the existing sql data base of the app with INSERT
(or UPDATE
in case changes of existing rows are possible too) and is afterwards available for offline usage / searching etc.
See http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html for possible methods on a database. With writing actions it's a good idea to use a transaction around it.
The other possibility would be to use push to device. But that would only be needed in case you want to inform the user, that something new is available. Found a nice article about this here: http://tokudu.com/2010/how-to-implement-push-notifications-for-android/ but have no experience with it myself.
Good luck with your app.
精彩评论