Hi, I have developed an app like that, which i use to control desktop mouse from my android phone, and send data from my pc to android app.
So basically i will use sockets, the app must connect to the desktop first using ip, when it does, we can make it send any data or commands we want, and make the app take actions based on that data . so i will create 2 simple apps for you, desktop one with java (eclipse) and android app (android studio) and you will have booth source codes and explain the code to you,
I can do this for you quickly
Regards