I'm using DirectScreenAccess in my app. If my app is in the foreground and I wait idling until the screensaver start, my app crashes with: "System Error, try again".
I did overload the HandleForegroundEventL and all is OK with the tasks switch, but in this case it seems like HandleForegroundEventL is not called somehow.
What i know is that seems HandleForegroundEventL is not called when screensaver is started/ended. I.e Your application dosen't change the position on application stack when screensaver activates.
Tha bad issue is that i don't know what is the "event" what you should listen to detect screensaver. I think this could depend somehow which platform you are using...i'm 'playing' within S80.
Hope somebody knows is there some API which is able to use to detect screensaver activation.
I've reilized that HandleForegroundEventL() IS called but the app crashes anyway. And it throws KERN-EXEC 3 message soon after the "System Error, try again".
And moreover.
Sometimes (!) all works good - the screensaver appears and nothing happens, I press a key and my app continues to work well. It happens in 15% approx.