1

So I have an application that logs medical data entered by user. I need to add functionality for backing up and restoring that data in case user changes their Android phone OR switches to and iPhone (there is an iPhone version of this app, which I have limited visibility into). The data is currently stored inside a SQLite DB on the device.

I need help figuring out cleanest/easiest way to do this. So far I am thinking about these options:

  1. add UI to email DB file to + UI to accept a DB file and copy it over current DB. Seems hacky.
  2. create a web service which will store user data and sync on the background. I would need to build sync process and introduce some kind of account system. This seems like quite a bit of work, though likely the most flexible solution in the long run.
  3. switch to Google Calendar as my data storage (data is essentially a set of event entries anyway). This would probably be most seamless, but iPhone option is out of the window.

Are there other pros/cons to these options that I am missing? Or perhaps there are some standard solutions to this?

4

1 回答 1

0

选项#1 充满了很多问题。从来自外部源的文件旁加载数据库并非易事。我不会推荐它。

选项#3 应该是可能的——但它要求用户设置一个谷歌帐户,这不应该是必需的(恕我直言)。此外,添加新日历和/或大量事件不会是许多用户最喜欢的功能。我个人会讨厌它。

第二种选择似乎最有希望。您可以随意构建它。你甚至可以让它只需要一个简单的识别码来备份——或者只提供“实时”同步。确实,您需要某种服务器和会计系统——但这些东西都是标准的,而且服务器很便宜。这个选项将是我的选择之一。

于 2012-11-28T22:14:39.410 回答