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)
精彩评论