开发者

Common Datastructure to synchronize contacts between android and osx

I'm trying to extract contact informations from android devices and synchronize it with the addressbook in osx. Basically a direct synchronization mechanism from device to device without the use of a necessary google account. So far I managed to run a socket server on the osx side and publish its service via bonjour which can be discovered and contacted from the android phone. I'm also using a syncadapter on the android side to provide the synchronization functionality.

So far the setup and the idea, my question is now, what would be the best choice in terms of data storage and communication?

On android, contacts are stored within a sqlite database, which can be queried. (Actually three tables to get the full set of informations Contacts.Contract.Data ..RawContacts and ..Contacts) The addressbook can be easily accessed via AddressBook.framewor开发者_开发问答k. I'm very unsure about how to get a common data structure to synchronize efficient and reliable. Is it a better choice to work on the sqlite database, or take a vCard as a common data object to sync on or is it better to do convert the android data into core data objects and sync on them? Tipps and comments are much appreciated. Maybe I'm also thinking way too complicated...


The vCard format was designed as a way to transport contacts so it should be able to work. It seems to me, though, that unless the OS X and Android SDKs provide an easy way to work with vCard that it would be easier to define your own XML format.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜