Djembefola Active Member Licensed User Longtime User Aug 20, 2011 #1 Some Keycode Constants are missing. For example: Keycodes.KEYCODE_MEDIA_PLAY (126) Keycodes.KEYCODE_MEDIA_PAUSE (127) Code: Compiling code. Error Error compiling program. Error description: Unknown member: keycode_media_play
Some Keycode Constants are missing. For example: Keycodes.KEYCODE_MEDIA_PLAY (126) Keycodes.KEYCODE_MEDIA_PAUSE (127) Code: Compiling code. Error Error compiling program. Error description: Unknown member: keycode_media_play
Erel B4X founder Staff member Licensed User Longtime User Aug 20, 2011 #2 The correct constant is KeyCodes.KEYCODE_MEDIA_PLAY_PAUSE
Djembefola Active Member Licensed User Longtime User Aug 20, 2011 #3 Erel said: The correct constant is KeyCodes.KEYCODE_MEDIA_PLAY_PAUSE Click to expand... It seems to depend on the Bluetooth Audio Driver, which Constant is used. On my HTC Keycodes.KEYCODE_MEDIA_PLAY_PAUSE works fine, but on newer devices (ACER A500 and Galaxy S2) Keycodes.KEYCODE_MEDIA_PLAY and Keycodes.KEYCODE_MEDIA_PAUSE are sent in the Activity_Keypress Event instead of Keycode.KEYCODE_MEDIA_PLAY_PAUSE from Bluetooth Audio. All three Constants are listed in the Android Documentation. Last edited: Aug 20, 2011
Erel said: The correct constant is KeyCodes.KEYCODE_MEDIA_PLAY_PAUSE Click to expand... It seems to depend on the Bluetooth Audio Driver, which Constant is used. On my HTC Keycodes.KEYCODE_MEDIA_PLAY_PAUSE works fine, but on newer devices (ACER A500 and Galaxy S2) Keycodes.KEYCODE_MEDIA_PLAY and Keycodes.KEYCODE_MEDIA_PAUSE are sent in the Activity_Keypress Event instead of Keycode.KEYCODE_MEDIA_PLAY_PAUSE from Bluetooth Audio. All three Constants are listed in the Android Documentation.
Erel B4X founder Staff member Licensed User Longtime User Aug 20, 2011 #4 This constant is only available since Android 3.0. You can still use the constant values.