> There is a lot of hoop-jumping to do this manually, because there's a lot > going on... import PRC to main memory (also check for newer versions in > main memory and present a dialog if found), launch the PRC, wait until PRC > is exited, delete the PRC from main memory, etc.
Thats about what you need to do. But it is a little easier than it seems. The VFSImport call returns an error if a database with the same name allready exists in RAM (regardless of version ) and you can set the recyclable bit in the database attributes after the import is finished. Then launch it with SysUIAppSwitch and it will be automatically deleted upon exit.
This is true, Jonatan, but it's still kind of a hassle for a couple of reasons:
1) Setting the dmHdrAttrRecyclable bit doesn't guarantee that the application will be deleted from storage memory as soon as it's exited; rather, when the OS gets around to it. This can be mitigated by also marking the application as 'hidden' so it doesn't show up in Launcher if the OS doesn't happen to immediately delete it.
2) The sysAppLaunchCmdCardLaunch is NOT sent, and an extraneous sysAppLaunchCmdSyncNotify -IS- sent (as a result of the VFSImport).
I'm looking for a cleaner solution. It seems like it would be so easy to have Launcher provide an API (by way of a launch code, for example) that lets you specify a filepath, and then it handles the rest by reusing the same code it executes when a card-hosted PRC is tapped by the user.
-Jeff Ishaq
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
