Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User agray's Avatar
    Join Date
    Apr 2008
    Posts
    27
    Hi,

    We can capture keypresses whilst our app is in background through the use of RWindowGroup::CaptureKey(). The problem I'm having is that I need to *observe* the keypresses rather than capture them, leaving them free to be consumed by whatever application is in the foreground.

    Specifically, I'm trying to observe EKeyYes presses with the phone on the idle screen without preventing the log application from coming to the foreground or an incoming call from being answered, which is what happens through simple use of CaptureKey.

    Strangely, observing EKeyNo via CaptureKey with the same priorities allows the rest of the framework/ui to receive End Key events, so that if we're in a call, pressing End Key disconnects even though we receive the event.

    I've tried calling RWsSession::SendEventToAllWindowGroups() in my application's HandleWsEventL(), and while it does work in that calls are answered or the Log App is launched, it's not a very elegant solution as it results in the Log App being launched when EKeyYes is pressed when the phone isn't in the Idle screen, i.e. in the menu screen.

    A more targeted approach would be to use RWsSession::SendEventToWindowGroup() with the appropriate Window Group ID, but I don't know what that would be; Getting the WgID of the Phone Idle application and sending the event to it didn't result in the launch of the Log App.

    Does anyone have any advice?

  2. #2
    Nokia Developer Moderator wizard_hu_'s Avatar
    Join Date
    Feb 2006
    Location
    Mallorca, Holiday
    Posts
    27,683
    RWsSession::GetFocusWindowGroup can get you the window group.

  3. #3
    Registered User agray's Avatar
    Join Date
    Apr 2008
    Posts
    27
    That's it sorted! I really ought to have spotted that. Thanks for the help!

Similar Threads

  1. Consuming CANotifyCallBack{...}
    By rizarizzo in forum PC Suite API and PC Connectivity SDK
    Replies: 2
    Last Post: 2010-04-13, 08:33
  2. [moved] Can the expert help? Consuming CANotifyCallBack{...}
    By rizarizzo in forum PC Suite API and PC Connectivity SDK
    Replies: 0
    Last Post: 2009-06-14, 18:08
  3. Too time-consuming when importing big project using carbide c++
    By runforu in forum Tools and SDK Feedback (Closed)
    Replies: 0
    Last Post: 2007-12-27, 02:11
  4. vibrate/alert whilst app is in background ?
    By Timoth in forum Symbian C++
    Replies: 7
    Last Post: 2007-09-13, 17:13
  5. vibrate/alert whilst app is in background ?
    By Timoth in forum Mobile Java General
    Replies: 2
    Last Post: 2007-09-13, 09:23

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved