My colleague, Andre, has put together a great little sample which shows how to control some basic functions of an AllJoyn enabled LG Television from a cross-platform mobile application using our AllJoyn Cordova Plugin.
The TV control sample app demonstrates basic features such as changing volume, channel, inputs and sending text notifications to be displayed on screen.
Building And Running The Sample
As a prerequisite, ensure you have the latest Cordova installed (sudo npm install -g cordova), as well as appropriate tools for your platform (xcode).
It is very easy to get the sample up and running, for example, if targetting iOS:
$ git clone https://github.com/AllJoyn-Cordova/cordova-tv-alljoyn.git $ cd cordova-tv-alljoyn $ cordova plugin add org.allseen.alljoyn $ cordova platform add ios $ cordova run ios
Behind the scenes a script in the plugin runs when you add your platform and git clones the AllJoyn Thin Client, which is combined with various platform specific target files and compiled when you run the application for the first time.
You’ll need an AllJoyn Router on the network, which you can learn about here.
Any of LG’s modern “Smart” TV’s should work, but we did our testing with the LG Electronics 55LB7200 55-Inch 1080p 240Hz 3D Smart LED TV.
Get more in-depth with Andre’s detailed post on how he figured out the TV control functionality/