[robsite.org]

« xmlproperty rocks | Main | Tivo HME JDeveloper Extension »

March 29, 2005

Creating Tivo HME Applications in Oracle JDeveloper

Tivo HME provides a Java API for developing applications running on your Tivo Series2 device as well as a Java Simulator to use during development. It’s quite easy to set this up to use JDeveloper as your IDE while creating Tivo HME applications.

First off you need to install the Tivo HME SDK from http://tivohme.sourceforge.net and uncompress it. In my example here, I used the C:\lib\ directory, which once unpacked put the SDK into C:\lib\hme_sdk_ea1.1. Once you have it installed, you can verify that it works by using the runsamples.bat (or runsamples.sh) script located in the samples directory.

To use the SDK in JDeveloper, you need to create a library. Here are the steps:

  1. Use Tools | Manage Libraries to bring up the Manage Libraries Dialog.

  2. Click New…
  3. Enter “Tivo HME” as the name of your library
  4. To the Class Path, add C:\lib\hme_sdk_ea1.1\hme.jar and C:\lib\hme_sdk_ea1.1\simulator.jar
  5. To the Source Path, add C:\lib\hme_sdk_ea1.1\src.zip

  6. To the Doc Path, add C:\lib\hme_sdk_ea1.1\doc\hme-javadoc.zip
  7. Click OK.

Now you will need to create a new Application testing the SDK.

  1. File | New
  2. Choose Application
  3. Enter a new name for your Application or accept the default value and click OK
  4. Enter a new name for your Project or accept the default value and click OK
  5. Tools | Project Properties
  6. On the Libraries page, add your newly created Tivo HME library to your project.
  7. File | New
  8. Select Java Class
  9. Change the class to extend com.tivo.hme.sdk.Application
  10. Add the following init method:
        protected void init(Context context) throws Exception
        {
            root.setResource(createText("default-36-bold.font", Color.white, "Hello from JDeveloper!"));
        }
    
  11. Add the following main method:
  12.     public static void main(String[] args)
    { Simulator.main(new String[] {HelloWorld.class.getName()}); }

Now you can run your application and the Tivo Simulator will launch your Tivo HME application.

 


Posted by rcleveng at March 29, 2005 04:36 PM

Comments

Post a comment




Remember Me?