开发者

Broadcast message on network from Android device

开发者 https://www.devze.com 2023-02-28 16:57 出处:网络
I am new to android app development. My app needs to broadcast a message on the local network with some data in it. Every device on the network gets this message. The app running on the receiving devi

I am new to android app development. My app needs to broadcast a message on the local network with some data in it. Every device on the network gets this message. The app running on the receiving devices, based on criterion specified in the message, respond back to the sender.

Is it possible to achieve this? If not, is there some alternative to it? C开发者_StackOverflow中文版an the messages be broadcast to multiple networks?


I'd look into Intents and Broadcasts. I'd provide a bit more information than this but this sounds a little like a 'homework question'....i.e. you've not provided enough information as to what you're trying to achieve.


They can't be broadcast to multiple networks from what I know. But look into Sockets and MulticastSockets. You can also check out the API for java.net (also known as network programming)

0

精彩评论

暂无评论...
验证码 换一张
取 消