Ok, so the way I understand it, there is a third app, lets call it app X. We don't know what X is. X launches. A does something then launches B. If the user presses one of the 4 hard buttons or the home button, your app will exit automatically and launch whatever the user selected. I believe the case that you are trying to describe is that the user did not launch another app. Instead, your app finished and decides to manually exit on its own, and it wants to return to app X. Here are my suggestions:
1. Don't do this. Let the user exit the app themselves. 2. If app X is the launcher, call SysUIAppSwitch to launch the launcher. The crid of the launcher is in the system prefs. 3. If you have no idea what app X was, use notifications to keep a running three entry long list of every app launched (there is a notification that will tell you when an app is launched). -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of SD Primality Sent: Tuesday, January 18, 2005 2:16 PM To: Palm Developer Forum Subject: Re: How to start Palm App B from Palm App A --- and let App A quit permanently Hi, Brief comments below... Ben Combee wrote: > At 11:21 AM 1/18/2005, you wrote: > >> Thanks everyone. >> >> To summarize: >> >> a) SysUIAppSwitch may be consistent across different versions of the >> OS, but there's no consensus yet. I've seen it behave differently on >> the emulator between OS 3.5 and 4.1 >> >> b) Palm OS just isn't designed to treat the App Launcher, for >> example, as the "Desktop" that you return to after running your >> programs. Palm OS seems to be based on stringing together the >> execution of apps in a sequence, one after the other. You can run >> whatever you want at any time, but when you quit your current app, >> the OS will take you back to whatever app launched it. That's the >> natural behaviour. >> >> c) There aren't any good ways around b). > > > If you want your app "B" to exit to a different app, then B needs to > call SysUIAppSwitch itself. You could write a routine that calls it, > then eats events from the queue until it's seen an appStopEvent, and > that would change the internal system variable, but it would have to > run in the context of app B. > I don't understand that approach. I get that App B needs to call SysUIAppSwitch itself to control where it goes. My goal, though, is to switch back to the app that launched App A. App B is not really supposed to know that. This would all be much easier if Palm OS allowed a "temporary jump-to app" that is launched once after a switch and eats itself immediately, leaving the main "next app to launch" untouched. Or just simply making the App Launcher the default "next app to launch" after every true quit. Shane -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
