如何通过互联网定期更新的数据库SQLlite? [英] How to update an SQLlite database periodically through the internet ?

查看:177
本文介绍了如何通过互联网定期更新的数据库SQLlite?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我提出,需要定期更新字符串SQLlite数据库Android应用程序。可以通过选择更新的互联网来完成,如果是如何?

我在我的应用程序数列出了由SQLlite数据库填补。该列表的内容需要每天改变。这就是为什么我需要每天更新。


解决方案

您可以采取以下方式:


  

    

保持在共享preference或SQLite和在应用程序启动检查日期变量,如果今天的日期比存储,那么你可以调用REST /基于SOAP的Web服务,并从服务器上获取更新的记录和日期更大更新你的sqlite table.In把你的名单将填充的最新数据...使用的CursorAdapter为


  

 


  

    

您可以实现GCM(谷歌云通讯)服务的服务器,它从断绝每天推更新的数据客户端。


  

 


  

    

每次launc你可以打Web服务和UPADTE您的SQLite数据库的应用程序的时间。


  

我希望的解决方案迎合了你的问题。

I am making an android application that needs to update periodically an SQLlite database of strings. Can updation be done through the internet, if yes how ?

I have a few lists in my application which are filled by the SQLlite database. The contents of the lists needs to change every day. That's why I need to update it everyday.

解决方案

You may take following approach:

maintain a date variable in the shared preference or sqlite and on application launch check that if todays date is greater than date stored then you can call the rest/soap based web-services and fetch the updated record from server and update your sqlite table.In turn your list will populate the latest data...use cursorAdapter for that

                   OR

you can implement a GCM(google cloud messaging) service on your server,which push the updated data from sever to client every day.

                 OR

every time you launc an application you can hit the web service and upadte your sqlite database.

I hope solution caters to your problem

这篇关于如何通过互联网定期更新的数据库SQLlite?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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