The following steps outline how to setup the development environment for TV Apps using the sample apps for guidance.
Before we start building a TV App, you need to make sure that the TV Simulator is installed and tested on your machine. To install the Simulator, follow the steps outlined in the Installation Guide.
The largest part of app development is the creation of the user interface and its behaviors. During the app design and development phases you can use the Simulator to preview and test your work. The benefits of using the TV Simulator for testing include:
After the ADK installation, if you have created launch icons on your desktop you
can double click on one of the launch icons to launch the Simulator for a particular OEM or resolution.
The Engine executable has been installed in the Linux directory
/usr/local/TVSimBuild. A startup script for the Engine is
You can also launch the Simulator from the terminal command line. For the latest production Simulator, at the prompt enter:
The following tutorial examples use the
MediaPlayerSample app as a reference.
Sample apps are installed with the ADK. You can find the source code for this app compressed into
.widget files in the
after you have completed the latest production installation.
The ADK installer will also create a root-level directory called
/devapps if it does not already exist. Any apps you copy into this folder are picked up by the Simulator when it starts up. This directory
can be used for testing your TV Apps.
For this tutorial, extract the
DL-XXX.com.yahoo.widgets.tv.videosample-2.0.0-install.widget into your local
root-level development directory
.widget file is
compressed, and must be unzipped (extracted) into the root-level
/devapps directory to create the
This tutorial uses sample apps to highlight the development process. Instead of using the sample apps in these examples
you are free to create new apps while following the outline of this tutorial. New apps should also be saved in the
/devapps folder. Follow these steps to load a new TV App into the Simulator:
Define a unique identifier in your
widget.xml file. To be safe, we recommend using a reverse domain name.
Choose the Simulator Reset menu item that applies to the version of the Simulator you are testing.
For example, from the Applications→Yahoo! CTV-ADK→Latest Production menu choose the Latest Production Simulator Reset menu
item. The Simulator Reset tool removes the local data in the corresponding
$HOME/YCTV-ADK/YCTV-SIM-Latest/data directory. Any apps you have
downloaded from the TV Store will also be removed by the Simulator Reset tool. You can download these apps again after a reset
Restart the Simulator. For example, from the Applications→Yahoo! CTV-ADK→Latest Production menu choose the Latest Production Simulator menu item.
For updates to your app, you can edit your existing app in
/devapps, or copy it to the
/devapps directory, and stop/restart the Simulator application
without needing to do a Simulator Reset.
The new or updated app shows up in the dock. If you do not see your new app in the dock, check the ownership and permissions
/devapps directory and its files to ensure
your current user has read/write/execute permissions, make sure you have a unique app identifier, and reboot Linux.