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


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

Junior Developer
Junior Developer
Posts: 19
Joined: Sat Dec 22, 2007 9:54 pm


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.

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


Return to General

Who is online

Users browsing this forum: No registered users and 2 guests