从移动应用程序到计算机的数据传输
我正在开发一个简单的程序,该程序从 Android 应用程序上的现场收集数据并将其存储在数据库中。我的下一步是能够从收集到的数据中获取数据并将其传输到计算机上运行的程序中。我正在寻找这方面的最佳建议。我的现场数据收集的一方面是我希望它是可扩展的,目前它仅适用于 Android,但将来我想要一个苹果版本。我研究过通过 USB 进行网络共享和传输数据,但是从我读到的内容来看,Android 对此存在问题,而且我不确定这对于苹果产品来说有多容易。我发现的另一个选择是使用专用的网络服务器。从移动应用程序下载,然后上传到计算机程序。 一种选择比另一种更好吗?我是否错过了一种选择?
I am working on a simple program that collects data from the field on an android app and stores it in a database. The next step for me is to be able to take the data from the collected and transfer it to a programming running on a computer. I am looking for best suggestions on this. One aspect of my field data collection is that I want it to be scale-able, right now it is only for android, but in the future I would like an apple version. I have looked at tethering and transferring data over USB, however from what I have read android has issues with that, and I am not sure how easy it is for an apple product. The other option that I have found is using a dedicated web server. Download from the mobile app and then upload to the computer program.
Is one option better then another, have I missed an option?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不要将数据库同步到计算机。相反,使用 Google App Engine 之类的工具将其同步到云。 API 更简单,而且结果也更有用。
Don't sync your database to a computer. Instead, sync it to the cloud using something like Google App Engine. The APIs are easier, and the result is more useful besides.
如果您确保主机上安装了 adb,那么您只需使用批处理脚本即可从 Android 设备获取必要的数据。
例如,让您的 Android 应用程序将其数据保存在 SD 卡上名为 fielddata.txt 的文件中
,然后您可以编写一个脚本:
If you ensure that adb is installed on the host computer, then you can just use batch scripts to grab the necessary data from the android device.
For example, have your android app save its data on the sdcard in a file called fielddata.txt
Then you can have a script: