将 Java 对象从我的 Android 手机发送到我的计算机
我想知道将对象从我的 Android 手机无线(通过 LAN)发送到我的计算机的最简单的程序是什么。我已经创建了带有服务器和多个客户端的Java RMI 程序,所以我掌握了这个概念。然而对于 Android 我只是不知道从哪里开始。
我的目标是将某种信息(可以只是文本)发送到我的计算机,我的计算机将执行操作。我已经完成了 GUI 界面和要执行的操作,只是发送某种信息就让我感兴趣了。
有人可以帮我吗?
I was wondering what the simplest program for sending an object from my Android phone to my computer wirelessly (via LAN) would be. I have created Java RMI programs with a server and multiple clients, so I have a grasp of the concept. However with android I'm just not sure where to start.
What I am aiming to do is send some sort of information (could simply be text) to my computer and my computer will do an action. I have the GUI interface's and the actions to be carried out all worked out, just the sending of some sort of information is getting me.
Could anyone help me out?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想说这与普通计算机之间发送数据没有太大区别。基本上你有相同的选择。除非您有一些特殊要求,否则最直接的解决方案是仅设置一个普通的服务器/套接字。
有关基础知识的教程(包括示例代码):http://www. ryerson.ca/~dgrimsha/courses/cps841/serverSockets.html
I would say it's not much different from sending data between regular computers. Basically you have the same options. Unless you have some special requirements, the most straight forward solution would be to just set up a ordinary server / socket.
A tutorial on the basics (including example code): http://www.ryerson.ca/~dgrimsha/courses/cps841/serverSockets.html