×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Regular Contributor
    Join Date
    May 2008
    Location
    India
    Posts
    172

    Question Volume Increase Key

    Hi,

    I want to detect whether the Volume Increase Key has been pressed and if it has, then do something. I referred to the following link http://wiki.forum.nokia.com/index.ph..._in_background, and replaced the following line
    Code:
    iHandle = iWg.CaptureKey(EKeyDevice0, 0,0);
    with
    Code:
    iHandle = iWg.CaptureKey(EStdKeyIncVolume, 0,0);
    . The application does not respond to the key press. Please help.

    Thanks,
    Shanker

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

    Re: Volume Increase Key

    The media keys can not be captured as normal keys the way u r capturing them, use the wiki link below to capture media keys :-

    http://wiki.forum.nokia.com/index.ph...ing_media_keys
    Cheers,
    Mayank

  3. #3
    Regular Contributor
    Join Date
    May 2008
    Location
    India
    Posts
    172

    Re: Volume Increase Key

    Hi Mayank,

    Thanks for the quick reply. The article is for S60 3rd Edition, S60 3rd Edition, FP1, S60 3rd Edition, FP2. Can I use the same for S60 5th Edition devices. I have a 5800, my app's been developed using S60 3rd Edition MR, I don't want to fiddle around with the code, just to get it to work on the touch devices.

    Thanks,
    Shanker

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

    Re: Volume Increase Key

    Quote Originally Posted by nair.shanker View Post
    Hi Mayank,

    Thanks for the quick reply. The article is for S60 3rd Edition, S60 3rd Edition, FP1, S60 3rd Edition, FP2. Can I use the same for S60 5th Edition devices. I have a 5800, my app's been developed using S60 3rd Edition MR, I don't want to fiddle around with the code, just to get it to work on the touch devices.

    Thanks,
    Shanker
    Yes, Sure you can capture the volume keys of 5800 using this code.I have done it and it is working perfectly.

  5. #5
    Regular Contributor
    Join Date
    May 2008
    Location
    India
    Posts
    172

    Re: Volume Increase Key

    Hi Sumit,

    Glad to know it worked out for you. I need to re-confirm whether the article is meant to handle the volume keys (physical keys) present on the sides of the device. If I am not mistaken, these keys are meant to turn the volume up/down of the speaker when a call comes in and maybe turn up/down the volume of the radio. Please confirm.

    Thanks,
    Shanker

  6. #6
    Super Contributor
    Join Date
    May 2004
    Posts
    2,265

    Re: Volume Increase Key

    Quote Originally Posted by nair.shanker View Post
    Hi Sumit,

    Glad to know it worked out for you. I need to re-confirm whether the article is meant to handle the volume keys (physical keys) present on the sides of the device. If I am not mistaken, these keys are meant to turn the volume up/down of the speaker when a call comes in and maybe turn up/down the volume of the radio. Please confirm.

    Thanks,
    Shanker

    Hi,

    I can confirm because I've managed to get the volume keys events by the Remote Control API too on a S60 5th Edition device.

    Regards

    Ziteng Chen

  7. #7
    Regular Contributor
    Join Date
    May 2008
    Location
    India
    Posts
    172

    Thumbs up Re: Volume Increase Key

    Hi Ziteng Chen,

    Thanks for the info. Will try it out.
    Thanks to all for contributing.

    Shanker

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

    Re: Volume Increase Key

    Quote Originally Posted by nair.shanker View Post
    Hi Sumit,

    Glad to know it worked out for you. I need to re-confirm whether the article is meant to handle the volume keys (physical keys) present on the sides of the device. If I am not mistaken, these keys are meant to turn the volume up/down of the speaker when a call comes in and maybe turn up/down the volume of the radio. Please confirm.

    Thanks,
    Shanker
    As i know you can get events for volume keys(side keys) to decrease/increase the volume.As i have done this using the same callbacks. The best option for you is to try it before asking for so much of assurance. Believe me it would not harm you.

    Regards,
    Sumit

  9. #9
    Regular Contributor
    Join Date
    May 2008
    Location
    India
    Posts
    172

    Thumbs up Re: Volume Increase Key

    Hi All,

    The link referred by mayankkedia work like a charm.
    Thanks a ton everyone.

    Shanker

    PS - Sumit, I have been misled quite a few times and lost precious time barking up the wrong tree, hence the need for assurance. Cheers.

  10. #10
    Regular Contributor
    Join Date
    May 2008
    Location
    India
    Posts
    172

    Re: Volume Increase Key

    Hi,

    Is it possible to detect the Volume Increase Key press when the application is running in the background, when I am using the method mentioned by mayankkedia? Please help.

    Thanks,
    Shanker

    PS - The app I am developing needs to detect the Volume Increase Key when it is working in the background, when the key press is detected it should bring it self to the foreground. This app works perfectly on E50, but does not work on S60 5th edition devices (it has been tested out on Nokia 5800 and N97). On 5800 and N97 the key press is detected only when the application is working in the foreground.
    Last edited by nair.shanker; 2009-06-10 at 07:25.

  11. #11
    Regular Contributor
    Join Date
    Dec 2007
    Posts
    50

    Question Re: Volume Increase Key - while runnig in the backgound

    Hi,
    I'm having the same problem - I used the suggested API to capture the multimedia key, but it doesn't work when the application is in the background.

    I would also like to be able send these keys (Volume Up/Down) to another application, or to simulate them from the background.

    Does anyone knows if it's possible?

    Regards,
    Asaf.

  12. #12
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    3,956

    Re: Volume Increase Key - while runnig in the backgound

    well you can capture the volume Up/down keys .Search wiki for capturing keys in background and set the parameter as below:

    iHandle = iWg.CaptureKey(EKeyVolumeUp , 0,0);

  13. #13
    Registered User
    Join Date
    Jan 2006
    Posts
    279

    Re: Volume Increase Key - while runnig in the backgound

    Hello!
    Any update on this? (handling the volume key in background application/server)

  14. #14
    Nokia Developer Champion
    Join Date
    Oct 2006
    Location
    Bangalore, India
    Posts
    1,572

    Re: Volume Increase Key

    Quote Originally Posted by nair.shanker View Post
    Hi,

    Is it possible to detect the Volume Increase Key press when the application is running in the background, when I am using the method mentioned by mayankkedia? Please help.

    Thanks,
    Shanker

    PS - The app I am developing needs to detect the Volume Increase Key when it is working in the background, when the key press is detected it should bring it self to the foreground. This app works perfectly on E50, but does not work on S60 5th edition devices (it has been tested out on Nokia 5800 and N97). On 5800 and N97 the key press is detected only when the application is working in the foreground.
    Hi,

    don't you think it is logically wrong to get your application to foreground consuming volume up key, specially say if i was listening to music in the background?
    where as when your app is in the foreground already, it is your choice what you want to do with the application.

    Sorry, got no solution, but was just wondering why would you want to use the volume keys to get your app to foreground?
    Amit Kankani
    Nokia Developer Champion

Similar Threads

  1. volume key event handling
    By whitewinds in forum Symbian Media (Closed)
    Replies: 4
    Last Post: 2009-05-13, 04:01
  2. Replies: 106
    Last Post: 2009-05-11, 05:53
  3. key codes for E61i volume keys???
    By manojkumar.m in forum Mobile Java General
    Replies: 6
    Last Post: 2008-01-08, 14:33

Posting Permissions

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