How to start writing apps for TiVO in NetBeans, in 5 minutes or less
These instructions are for a current NetBeans 4.1 development build, but the process is very similar for NetBeans 4.0.
First, you will need to download the
TiVO SDK
,
and unpack it to, e.g.,
/tivo
Now, in NetBeans:
- Select File | New Project to open the New Project Wizard.
-
Select the
General
category in the left-hand pane, and
Java Application
in the right-hand pane, and press
Next
.
On the next pane of the wizard name the project
TivoTest, and press Finish to create the project. - Right click the TivoTest node in the Projects tab of the Explorer window (to the left of the editor) and choose Properties from the popup menu that appears, to show the Project Properties dialog.
- Select the Build | Compiling Sources node in the left-hand pane of that dialog, and Click the Add Library button on the right. This displays a list of libraries NetBeans already knows about. If this is the first time you've used the TiVO SDK, you'll need to set it up as a library; otherwise, steps 5 through 7 can be skipped.
-
Click the
Manage Libraries
button
in this dialog. In the next dialog, click
New Library
at the bottom left.
In the New Library dialog, type
Tivoand press enter to close the dialog. - The Library Manager dialog will now show a new library on the left called Tivo, with no contents. Click the Add Jar/Folder button on the left. In the file dialog that appears, navigate to wherever you unpacked the TiVO SDK. Select hme.jar and simulator.jar , and press the Add JAR/Folder button at the bottom of the file dialog to accept them.
- Now switch to the Sources tab, and click its Add JAR/Folder button, and add src.zip , so javadoc comments will be visible with code completion for the TiVO SDK classes. Future projects can simply be pointed at the library which you have just created.
- Click the Add Library at the bottom of the Add Library dialog button to add the new TiVO library to your project. Click OK to close the Project Properties dialog.
-
Now that all the dialogs are closed, you should be looking at the
Mainclass that was generated by the New Project Wizard. Change the superclass to beApplication. Press Alt-Shift-F (Ctrl-Shift-F on Macintosh) to auto-importcom.tivo.hme.sdk.Application, the superclass. -
Insert the following code into the
Mainclass (don't delete themain (String[] args)method!):protected void init(Context context) { root.setResource(createText("default-36-bold.font", Color.white, "Hello from an application!")); } -
Now just insert the following line in the existing
main (String[] args)method:Simulator.main(new String[] {Main.class.getName()});
For anybody interested, they appear to be running a developer contest .
Now if there were just something on TV aside from plastic surgery, car makeovers and Law and Order...is it just me or did American television go completely insane over the five years I was living overseas?
- Login or register to post comments
- Printer-friendly version
- timboudreau's blog
- 935 reads





