如何通信的两个Android设备? [英] How to communicate two android devices?

查看:99
本文介绍了如何通信的两个Android设备?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你们可以在任何一个可以帮助我一点点,我正在做一个Android应用程序,对出租车的要求,但我需要一种方法来发送到驱动程序的应用程序,在那里他接受邀请拿起客户端警报如果他选择接受按钮,并提醒客户端应用程序弹出告诉他,司机是在路上:)谢谢,我想我需要线程我总是看着这些客户端通知。

Hi guys could any one help me a little bit, I'm making an android app, for cabs request, but I need a way to send to the driver app, an alert where he accepts the invitation to pick up the client, if he choose the accept button, and alert pops up on the client app telling him that the driver is on the way :) Thanks, I think i need for Threads to me always watching for these client notifications.

推荐答案

您可以使用Socket编程。这是它显示了如何在模拟器显示两款Android phones.Example之间进行通信的例子

You can use Socket programming. This is an example where it shows how to communicate between two android phones.Example shown in emulators

http://examples.java$c$cgeeks.com/android/core/socket-core/android-socket-example/

这篇关于如何通信的两个Android设备?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆