Remote controlling Windows Media Center

1.6k Views Asked by At

I am interested in building a remote control app of sorts for android devices to allow them to control windows media center on windows 7. How can I send commands to media center as if they were coming from a physical remote? Lets say for instance I wanted to change the TV to channel 67, how would I do that code wise? I would prefer to do the coding in C# but am open to C++

2

There are 2 best solutions below

1
On

You should try using Bluetooth Stack, widecomm or bluesoliel drivers. You will need to send BT commands to the Media Center PC via your andriod phone and process them to tune the channels.

0
On

My approach so far has been to write a custom Media Center AddIn (download the Media Center SDK) and implement the two very simple interfaces: IAddInModule, IAddInEntryPoint. There are a couple of minor hoops that you'll need to jump through in order to host it which include GAC'ing your add-in and registering it using RegisterMCEApp.exe but Googling these makes it quite simple.

Once you have got to this stage you'll see your Add-in appear in the Extra's page in Media Center and then you have the option to host the add-in as a WCF service (or however you so desire) which provides many opportunities for remote management.

With the injected AddInHost type from Media Centers SDK you have the ability to perform host commands such as:

Host.MediaCenterEnvironment.MediaExperience.Transport.PlayRate = PlayRate.Play

Hope this helps, I'm still very much learning the ropes here myself.