如何通信的两个Android设备?两个、通信、设备、Android

2023-09-07 02:51:21 作者:弒血

你们可以在任何一个可以帮助我一点点,我正在做一个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/

 
精彩推荐
图片推荐