My first application for the Karotz is called Movies. It scrapes the Google movie listings, and reads you upcoming titles and showtimes for the theater of your choice. Full source download and additional discussion after the break.
I'm posting here in the hope that it'll be useful to others who are writing their own Karotz apps, but also in the hope that I'll get constructive criticism. So, if you see something dumb, call me on it. I don't promise to always agree, but you won't hurt my feelings. Telling me it sucks is encouraged so long as you detail the specific nature of the suckage in question.
So, the sources:
(Both of the above are identical save for the means of archiving.)
Some specific lessons learned:
- Go through the tutorial and get a "hello world" program working first (on the virtual machine, then on the physical device).
- When you're testing with the VM, settings won't be available in the same way they are when you're running "for real". See the initialization block near the top of the connected() function in my source for one way to deal with this.
- The values you get from params[instanceName].whatever are strings. When you're faking parameters for the VM, your fakes should be strings too, not scalars. If you mess this up, you'll get an app that tests fine but fails when deployed to the device, and it'll be very hard to debug.
- If you are trying to debug something that only happens on the real device, logging to an external webserver can be extremely valuable. See hlog() in my source.
[Updated 2012 Nov 08 by DGH to fix broken download links]