Android App that communicates with a Java Program on a PC
Where would I start if I want to create an Android App that communicates with a Java Program on a PC开发者_如何学编程 through WiFi. What I am actually trying to achieve is I wanna make a Wifi Doorbell System. Install the Android App on the phone, Install the Java App on the PC. I just wanna ring the Java App using the Android phone.
I have only started learning developing Android apps. I only know the basics such as using TextView, EditText, and Spinners. I think the android.net.wifi is going to be on a different level though.
Thanks.
One easy way is to code kind of network server to the pc using java, and then code a client that talks to that server in android. Using some kind of protocol you can send various commands to the server to execute locally to the pc.
I don't think you need worry about wifi, if both the phone and the pc are on the local network, you would just have the java app listen on a particular port, and the phone app would send messages to the pc's ip address on that port.
That's the high level answer anyway.
Another solution (may be) is to make every android devices recognizable on the network, and send a datagram message to every devices on the LAN
精彩评论