1. You want that $100.00 in your pocket or an Amazon Fire TV don't you? Well here's the deal. With our new updated look we are in desperate need of an updated logo. The 'old' one has certainly served us well, but it's time. Find all the details here: bit.ly/1q0k6Wa
  2. DroidForums.net is currently undergoing a major software upgrade. If you are experiencing any problems logging in please: Contact Us

The event handlers for the device buttons

Discussion in 'Android General Discussions' started by Dr.Kumar, Jan 25, 2013.

  1. Dr.Kumar

    Dr.Kumar New Member

    Jan 25, 2013
    Likes Received:
    Trophy Points:
    Hi all,

    I am working on an Android VoIP solution. I have got some problem with the event handlers for the device buttons so I googled for codes and I have found one on a VoIP website (Ozeki VoIP SIP SDK). In the code the event handler functions for handling buttons are listed. There is no difficulty to handle these buttons within the Adobe Flash code.

    1. private function handleActivate(event:Event):void
    2. {
    3. NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;
    4. }
    6. private function handleDeactivate(event:Event):void
    7. {
    8. NativeApplication.nativeApplication.exit();
    9. }
    11. private function handleKeys(event:KeyboardEvent):void
    12. {
    13. if(event.keyCode == Keyboard.BACK)
    14. NativeApplication.nativeApplication.exit();
    15. }

    Could you provide me any C# codes similar to the mentioned one?