How to get the event of pressing a button Volume + and -?

How to get the event of pressing a button Volume + and -?

BY 19 Nov 2013 Native Application Development

Hi all,

For my project must receive the event from press buttons Volume + & – and transfer them to your application written for Tizen 2.2.0

void OnKeyPressed ( const Tizen::Ui::Control& source, Tizen::Ui::KeyCode keyCode )
{
       AppLog( ” OnKeyPressed.” );

      if( keyCode == Tizen::Ui::KEY_SIDE_UP )
      {
            AppLog( “Press KEY_VOLUME_UP.” );
      }
      else if( keyCode == Tizen::Ui::KEY_SIDE_DOWN )
      {
            AppLog( “Press KEY_VOLUME_DOWN.” );
      }

}

But this is not work. Also, I can not send a new volume to my device from program.

Please, help me to solve this problem. 🙂 

Written by