Logged in as Guest   Sun, Oct. 21st, 7:39 AM.      
 
 
Web hazelware.luggle.com
 

Documenting Wrongs (PalmOS)
One of the purposes for me having this blog is that I use it as a personal reference for quirks and oddities that I find while developing for PDAs and Smartphones. When I find something, I'll write a short blog about it. Then, later, when I'm trying to remember how to do something, I can actually search for it on the blog. This is one of those times.
So, I'm working on a little utility for my Treo 650 that has to know when an incoming phone call arrives. Now, I've worked with these APIs before (as I've documented in other posts here) and I thought that I knew how to be notified when a call comes in. It should be pretty simple; you have to 1. Load/Open the phone library, 2. Call PhnLibRegister, and then 3. Check for the phnLibLaunchCmdEvent in your PilotMain.
I sat down one evening and quickly wrote the code to do it. It all went pretty smoothly until I actually went to run it. According to my asserts and debug statements, everything loaded and registered correctly, but for some reason, I wasn't receiving any notifications.
Naturally I went to the web. I Googled everything I could. I looked in the PalmOS newsgroup archives. I looked in the Palm Inc. developer site. I looked in the sample code put out by both PalmOS and Palm. I couldn't figure it out. I was doing everything that they were. Why wasn't mine working? I struggled to rework the tiny bit of code in numerous different ways, all to no avail. Finally, through persistence and thanks to the magic of Google, I found this bizarre chat transcript that (in a round-about way) describes how the value for phnLibLaunchCmdEvent used to be '2bad'. According to the transcript, it had to be changed from '2bad' to 'abad' because '2bad' isn't a valid value according to the PalmOS rules for custom launch codes. Weird.
I went and looked at the value defined for it in my header files and sure enough, it was '2bad'. Apparently, I have a very old version of the Handspring SDK. Ugh. If I had gone with a clean install of the SDK from Palm's site, I would not have run into this. So, now that I have a valid value, I'm up and running. However, I do have a question if anyone knows: "Are there any Treo devices that actually use the value '2bad' for phnLibLaunchCmdEvent?" Since my only reference is that weird chat transcript, I would love to know the full history behind it. Ok, back to my code now.

-Jon
Submitted by bosshogg on Wednesday the 31st 1970f December 1969, at 04:00

 
Recent Entries:
I'm BACK!!!!!!
Code Monkey
Cool 3D Code Snippet From My Former Life
YouTube: The Revival of the Internet Time Killer
WhereMate Released
Palmasaurus Released As Freeware
VM-Plus Beta
Handspring Undocumented APIs
Posting Malaise
PhoneShield Released!!!

Archive:
October - 2007
August - 2007
July - 2007
June - 2007
May - 2007
April - 2007
December - 2006
November - 2006
September - 2006
August - 2006
July - 2006
March - 2006
February - 2006
January - 2006
December - 2005
November - 2005
October - 2005
September - 2005
August - 2005
July - 2005
June - 2005
May - 2005
April - 2005
February - 2005
January - 2005
December - 2004
November - 2004
October - 2004
September - 2004
August - 2004
July - 2004
June - 2004
May - 2004
April - 2004
March - 2004