×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    413

    Capturing Volume Key in a Symbian Application which is in Background.

    Hi all,

    I have a symbian application which is always running in a background. Is it possible to capture a long key press for a volume key(either volume increasing or volume decreasing key)in that application?

    Thanks in Advance.


    Rohanwaugh
    Last edited by rohanwaugh; 2009-05-18 at 13:16.

  2. #2
    Registered User
    Join Date
    Jun 2008
    Location
    India
    Posts
    1,048

    Re: Capturing Volume Key in a Symbian Application which is in Background.

    Quote Originally Posted by rohanwaugh View Post
    Hi all,

    I have a symbian application which is always running in a background. Is it possible to capture a long key press for a volume key(either volume increasing or volume decreasing key)in that application?

    Thanks in Advance.


    Rohanwaugh
    Hi rohan,
    see RemConeCoreAPI.h and use the function

    MrccatoCommand(TRemConCoreApiOperationId aOperationId,
    TRemConCoreApiButtonAction aButtonAct);

    To capture the volume up and down keys

  3. #3
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    413

    Re: Capturing Volume Key in a Symbian Application which is in Background.

    hi ,

    is it possible to capture these keys in a background application? My application running in background should be able to detect the captured keys..is it possible with that API?

    Thanks and regards.


    Rohanwaugh.

  4. #4
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: Capturing Volume Key in a Symbian Application which is in Background.

    Why don't you try with the example on the wiki?
    Download Symbian OS now! [url]http://developer.symbian.org[/url]

  5. #5
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: Capturing Volume Key in a Symbian Application which is in Background.

    Yes it is possible, no where does the API say that you need to be in foreground to get the keys, however make sure that you handle the keys well or otherwise pass it back to the original control as mentioned on the wiki page.
    Cheers,
    Mayank

  6. #6
    Regular Contributor
    Join Date
    Sep 2008
    Location
    India
    Posts
    126

    Re: Capturing Volume Key in a Symbian Application which is in Background.

    Hi mayankkedia,
    1. On the same line ... I was trying to capture following keys :

    ......
    iWg=RWindowGroup(iWsSession);
    ......
    iHandle0 = iWg.CaptureKey(EKeySliderUp,0,0);
    iHandle1 = iWg.CaptureKey(EKeySliderDown,0,0);
    iHandle2 = iWg.CaptureKey(EKeyMenu,0,0);
    iHandle3 = iWg.CaptureKey(EKeyIncVolume,0,0);
    iHandle4 = iWg.CaptureKey(EKeyDecVolume,0,0);
    iHandle5 = iWg.CaptureKey(EKeyUpArrow,0,0); -------->Done
    iHandle6 = iWg.CaptureKey(EKeyDownArrow,0,0); --------->Done
    2. And I got success in catching only last two keys ... and the volume related keys.
    3. My application is running in background , I am using
    switch(e.Key()->iCode)
    { ....}
    4. Is any problem with capturing volume keys in this way? plz comment if any one knows about this ...

    Thanks and Regards,
    Kranti

  7. #7
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: Capturing Volume Key in a Symbian Application which is in Background.

    I havent tried this approach, but the fact that Nokia/Symbian has decided to launch a seperate remote control API would suggest that capturing the media keys using the other approaches might not work. Are you trying to block those keys from being passed to the media player in some ways or wat?

    Are you getting any run time errors, or simply it doesn't work.
    Cheers,
    Mayank

  8. #8
    Regular Contributor
    Join Date
    Sep 2008
    Location
    India
    Posts
    126

    Re: Capturing Volume Key in a Symbian Application which is in Background.

    Hi mayankkedia,

    1. I am not at all getting any error with this approach
    2. Only thing is that i am not able to capture those keys
    3. Actually I want to capture a key on ( 5th Ed ) N97 which are easily available to capture
    Without slide out the keypad , And I able to capture .... Yes/No Keys (Green/Red) and on the same line trying to capture volume keys, middle menu key...

    4. On some combination of event I want to invoke my own application.

    Thanks and Regards,
    Kranti

  9. #9
    Super Contributor
    Join Date
    Mar 2004
    Location
    Bangalore,India
    Posts
    2,146

    Re: Capturing Volume Key in a Symbian Application which is in Background.

    AFAIK the only way to capture the media keys is the rem con api, someone please correct me if i am wrong.
    Cheers,
    Mayank

  10. #10
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    413

    Re: Capturing Volume Key in a Symbian Application which is in Background.

    hi Mayank,

    U mentioned in ur last thread that it is possible to capture Media Keys using remote control API even when your application is in background.I send my application to background but now i am not able to detect volume keys which i was able to detect when my application was in foreground.

    why is this happening?

    Thanks in Advance.

    Rohanwaugh

Similar Threads

  1. Sending an application to background in symbian 9.1
    By kannabiran.krish in forum Symbian
    Replies: 19
    Last Post: 2010-03-24, 06:49
  2. Do Symbian rejects the Express Signing request on any Business Development ground?
    By arpit2agrawal in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 23
    Last Post: 2009-02-19, 10:46
  3. Symbian UI Application Development Options
    By sandeepkumar03 in forum Symbian User Interface
    Replies: 1
    Last Post: 2009-02-05, 18:05
  4. Replies: 11
    Last Post: 2008-05-23, 08:10

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×