Kevin O'Keefe from invivodata, inc. ® writes:
"The product produced by my company, invivodata, inc., is used by pharmaceutical companies during clinical
trials and is put into the hands of users who are, for the most part, completely non-technical folks. Due to
the use of our diary application in clinical trials, it is important that our application completely control
the device and not let users exit our application. Because of our audience, we have attempted to make the Palm
OS user interface even simpler to use by hiding some details of functionality, particularly the network settings.
This posed a problem for us when it was time to control the network settings because the OS provided no API for
setting the current network service or for changing any settings within a service.
Palm came to the rescue, sort of, by providing an unsupported library, the NetServiceAPI library. This library
utilized some inner knowledge of the Palm OS Network preferences to allow applications to select the current
network service and to change some settings. However, this library never really worked as there always seemed
to be some incompatibilities between the structures the library used and the structures deep within the network
library itself, so consequently we would run into problems with corrupted phone number strings (which we
ultimately had to fix with a patch to MdmDial). This did allow us to stay within our application and offer a
simplified version of network settings to our users, but it was pretty expensive over the years.
When Palm OS 4.1 was released on various devices, we found that our network settings library and MdmDial patch
combination no longer worked. The implementer of the NetServiceAPI library made the library return an unsupported
version error on devices with 4.1 or higher - we were hosed.
I began to reverse engineer the various launch codes that can be used to talk to the network library and tried
to recreate the NetServiceAPI library so we could continue on. I worked on this for a day or so and then saw a
message on the Palm Developer Forum from someone trying to do as we had. I saw a response from Peter Easton
proclaiming that he had created just such a library. I jumped to his web page and checked out the header to his
library and was pleasantly surprised to see that the structures that he had created pretty much matched the ones
that I was coming up with for my library. The more I looked at the header, the more convinced I was that he had
really already done all the hard work. So it was a no-brainer to pay the small fee to see if his library
actually worked.
I had to slightly restructure my existing code to accommodate the new API (but not really that much as the API
was similar enough to the now defunct NetServiceAPI that there was a clear pathway to using the new library).
Once I had it hooked in (about 30 minutes later), I fired it up and was quite pleased that not only did it work
on all the devices I tested it on (m500, m515, Clie N610C and Clie S360), but it also completely removed our
need for our MdmDial patch and several other painful machinations we had to do to get the other library to work.
All in all, our use of this library saved at least a week of development time and actually reduced our code size.
The library paid for itself in about 3 hours.
If you need to allow your users to select network preferences in a manner that needs to be more controlled than
by use of the Network Preference Panel, then the PE_NetLib will greatly simplify your task."
Kevin O'Keefe
Senior Software Engineer
invivodata, inc. ®
the science of patient experience®
5615 Scotts Valley Drive
Scotts Valley, CA 95066
Tel: (831) 438-9527
Fax: (831) 440-1770
http://www.invivodata.com
HotSync is a registered trademark of Palm, Inc.