> Hi all, > > I have a Treo 650 and working on improving Palm Chess Client to play chess > on freechess.org. One inconvenience of playing chess with that is that > after receiving a phone call the chess application stops and the UI > displays the Phone application in its place. > > This happens also with standard applications like Calculator, but there > are others like the TomTom Navigator that behaves much nicer: when a phone > call gets in the usual "Accept/Cancel" alert is displayed, but after > clicking on "Accept" the UI still displays the Navigator! And when the > call is over just another small alert is popped up. > > What is the trick behind such "always alive" applications and how can I > replicate such behaviour? >
It's rather simple, really. All you need to do to keep your own app running during a phone call is to block the AppStopEvent that is posted when the phone call is answered. When you answer the call, the system attempts an AppSwitch to the Phone app, to give the user the standard in-call phone UI. Just block the AppStopEvent that is generated by the AppSwitch attempt, which keeps your app running. When the call ends (other side hangs up or user hangs up with red hangup button), the popup alert about the call ending is displayed, but your app still stays running. -- David Thacker http://www.SatelliteForms.net The Premier RAD Tool for PalmOS & PocketPC -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
