how to call EnableVisibilityChangedEvents ?

Login to reply to this topic.
Sun, 2008-07-06 09:15
Joined: 2008-07-06
Forum posts: 3

I call EnableVisibilityChangedEvents in my CAknAppUi by this:

CEikonEnv::Static()->RootWin().EnableVisibilityChangeEvents();

but it always crashes.

It this the correct way?

I am doing this because I want to being notified of any screen visibility change.

Note all other Enable* function calls work fine. (e.g. EnableFocusChangeEvents())

Thanks


Mon, 2008-07-07 08:35
NewLC AdministratorSymbian AccreditedForum Nokia Champion
Joined: 2003-01-14
Forum posts: 2006
Re: how to call EnableVisibilityChangedEvents ?

Isn't overriding HandleForegroundEventL() enough for you ? (see http://www.newlc.com/Moving-an-application-to.html)


Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant

Thu, 2008-07-10 08:21
Joined: 2008-07-06
Forum posts: 3
Re: how to call EnableVisibilityChangedEvents ?

Overriding HandleForegroundEventL is a good idea and I did that, but I end up testing for a lots of Uid inside my HandleForegroundEventL() function; as I want my app to quit when other apps (besides network APN dialog, help, bluetooth selection, etc etc) are in front of my app. so kind of like when a full screen app is in front of my app, i will quit, otherwise i won't.

Wed, 2008-07-16 00:40
Joined: 2008-07-06
Forum posts: 3
Re: how to call EnableVisibilityChangedEvents ?

I found out CEikonEnv::Static()->RootWin().EnableVisibilityChangeEvents(); will crash inside my AppUi constructL(), so I end up create a new Window-owned control inside my top window and call Window().EnableVisibilityChangeEvents() and listen to it inside my AppUi WsEventL() ...

  • Login to reply to this topic.