Intercepting KEYCODE_CALL

General topics about the Android-Platform itself.
Coding issues please to the subforum right below.

The Green Call Button (KEYCODE_CALL)

Postby daniel.kick.ass » Wed Feb 06, 2008 11:18 pm

Guys,

Does anyone knows how to intercept the "KEYCODE_CALL" event?
Seems like the activity won't pass it on to the "onKeyUp" handler.

Daniel.
daniel.kick.ass
Junior Developer
Junior Developer
 
Posts: 19
Joined: Sat Dec 22, 2007 9:54 pm

Top

Postby plusminus » Fri Feb 08, 2008 12:49 pm

Hello daniel,

in the Activity-Class I found the following:
public final void setDefaultKeyMode(int mode)
Select the default key handling for this activity. This controls what will happen to key events that are not otherwise handled. The default mode (DISABLE_DEFAULT_KEYS) will simply drop them on the floor.

but it also says to the same function:
Note that the mode selected here does not impact the default handling of system keys, such as the "back" and "menu" keys, and your activity and its views always get a first chance to receive and handle all application keys.


Sounds ambiguous to me :?
But it is definitely worth giving it a try.

Regards,
plusminus
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

Return to General

Who is online

Users browsing this forum: No registered users and 3 guests