Android SQLite和桌面同步 [英] Android SQLite and Desktop Sync
问题描述
我无法弄清楚实现这样的场景的最佳方法是什么:
I am unable to figure out what is the best way to achieve a scenario like this:
处理将android应用程序作为客户端的项目。
Working on a project that would have android application as client.
- 用户将把安装了Android应用程序的设备带到现场/访问并捕获/打孔/关键数据。此数据将本地存储在SQLite数据库中的设备上。
- 需要将SQLite中捕获的数据导出并导入桌面应用程序(可能是基于java或.net)进行进一步处理。
其他积分:
A.用户可以通过usb将手机连接到桌面。
B.数据流总是在一个方向(即Phone to Desktop)。
C.电话上没有互联网连接
Other points: A. User could connect the phone via usb to desktop. B. data flow would always be in one direction (i.e. Phone to Desktop). C. No internet connection on the phone
我的困境是如何在桌面应用程序中以编程方式访问sqllite数据库?是否有任何JDBC驱动程序可以从通过USB连接到计算机的设备读取sqlite数据库中的数据?
My dilemma is how to access the sqllite database programmatically in desktop application? Are there any JDBC drivers that could read data from the sqlite database from a device connected via USB to the computer?
推荐答案
这只是一种做你想做的事情的方法,有更多方法可以做到但是从我的角度来看是最准确和可扩展的。
This is just a way to do what you want, there are more ways to do it but from my point of view is the most accurate and scalable.
您必须在Java,PHP等上创建一个Web服务服务器......使用MySQL,MongoDB等数据库......因此,移动设备与作为云的数据库同步。
You would have to make a webservices server on Java, PHP, etc ... with a database MySQL, MongoDB, etc ... and so the mobile device is synchronized with the database that was the cloud.
因此,桌面客户端连接到Web服务以提供数据以便在您的数据库上处理它桌面客户端。
Thus after a desktop client would connect to the webservice to bring the data in order to process it on your desktop client.
编辑:
您可以查看此帖子的
- send-data-from-android-to-pc-via-usb
- transferring-data-usb
- bi-directional-data-transfer-through-usb-between-an-android-device-and-a-pc-mac
这篇关于Android SQLite和桌面同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!