在Windows上与Android应用程序共享SQLite数据库 [英] shared SQLite db on windows with android applications
问题描述
使用Android应用程序在Windows上共享SQLite数据库
我想要在某些设备上安装写入应用程序android安装器¥b $ b我想要所有应用程序安装的中心数据库
我希望在Windows上与我的应用程序共享一个SQLite数据库
I want write application android that install on some device android
I want Center Database for all of application install
I want shared one SQLite db on windows with my Application
我使用Web服务,但我希望使用连接到带有IP或(本地网络)或其他方式的数据库
I use Web Service but i want use connect to db with IP or (local network) or other way
谢谢
推荐答案
我认为您无法通过Android的套接字(IP)连接连接到远程SQLite数据库。移动数据连接不如笔记本电脑/ PC上的LAN或WiFi那么可靠。
I don' think you will be able to connect to remote SQLite database via socket (IP) connection from Android. Mobile data connections are not so reliable as LAN or WiFi on notebooks/PCs.
我认为webService是最适合您的解决方案。所有客户端(Android应用程序,Windows应用程序)都应该连接到此webService。
I think webService is the best solution for you. All your clients (Android apps, Windows apps) should connect to this webService.
区别在于webService调用它只是短连接(连接,发送请求,接收响应,关闭)连接),而数据库连接需要及时保存并且可以中断,这可能导致数据不一致或交易中断。
Difference is that webService call it's just short connection (connect, send request, receive response, close connection), while database connection need to be persisted in time and can be interrupted, which may cause in inconsistent data or broken transactions.
编辑:其他方式是使用一些MBasS(移动后端即服务)。例如Parse.com。它可能是您的数据库,并提供自己的REST API来访问它。
Other way is to use some MBasS (Mobile Backend as a Service). For example Parse.com. It could be your database and the provide their own REST API to access it.
这篇关于在Windows上与Android应用程序共享SQLite数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!