What's new
DroidForums.net | Android Forum & News

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

The event handlers for the device buttons

Dr.Kumar

New Member
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. }
5.
6. private function handleDeactivate(event:Event):void
7. {
8. NativeApplication.nativeApplication.exit();
9. }
10.
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?

Thanks,
Amit
 
Back
Top