Subject: Re: Close an application when the device is "turned off" From: terry markovich <[EMAIL PROTECTED]> Date: Wed, 03 Dec 2003 17:38:46 -0500 X-Message-Number: 32
On Wed, 03 Dec 2003 22:38:27 +0200, Eugene Mayevski wrote:
> tm> I have been working with the new Aceeca Meazura unit (palmos 4.1.2)
> tm> and
> tm> I need to be able to turn power on and off to the external module, so
> tm> this is what I do when the unit goes to sleep, with notifications
> tm> (4.0 >):
>
> Thank you for the snippet. My problem is that my application (device part of
> very handy password keeper) opens an encrypted file and loads some data to
> application heap memory. It makes sense to close the application when the
> device is turned off (for security reasons). If I register notification, I
> will of course receive this notification, but I will not be able to notify
> "main copy" of my application that it needs to close the database and clear
> the memory it allocated. If PalmOS had IPC mechanisms to notify *running*
> application, I would be able to send some notification, but as for version
> 3.5 (or even 4.x, but we support 3.5) there seems to be no such mechanism.
>
> Sincerely yours,
> Eugene Mayevski
Actually, 4.x and higher -will- notify your running application, as that is how I am using it. Remember, your app is still running when the device goes to sleep.
To support OS levels before the notification was implemented, you'll need a shared library. Shared libraries receive power-on and power-off events.
Roger Stringer Marietta Systems, Inc. (www.mariettasystems.com)
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
