5

I am looking for a working code example for Symbian S60 5th edition in which a console application can receive power off events (i.e. detect phone switch off). I know how to do this from UI application [AppUI, HandleSystemEventL(const TWsEvent& aEvent), etc], but Windows Server does not seem to send events if simple console application is listening to these events.

So, I have tried to connect to WS, call EventReady(&iStatus), but RunL is never called, and the application never receives EApaSystemEventShutdown.

Can anyone here provide working code for this?

Thank you.

Zach Burlingame
  • 13,476
  • 14
  • 56
  • 65
Bojan Milankovic
  • 847
  • 3
  • 11
  • 23

1 Answers1

1

You can use CSaveNotifier (savenotf.h, powermgrcli.lib) to receive powerdown notifications. Sorry, don't have a code snippet available at the moment.

laalto
  • 150,114
  • 66
  • 286
  • 303
  • No, it does not work. I have followed instructions on how to use CSaveNotifier (what is written in "Symbian OS Internals"), but the function SaveL() from MSaveObserver never gets called. The mechanism may apply to UI-based applications only. – Bojan Milankovic Feb 01 '10 at 12:48