HTC Desire keyboard problem

by Michael Rueger » Sat, 17 Apr 2010 15:46:35 GMT


Sponsored Links
 Hi all,

a day away from deployment...
Our application which we had tested on a G1 with 1.6 and a Nexus with 
2.1 suddenly has unexpected problems on a HTC desire (German version) 
with 2.1.


It seems that the keyboard behaves differently:

- event.getAction() == KeyEvent.ACTION_UP
doesn't work/fire

- android:imeOptions="actionNext"
doesn't seem to be honored by the keyboard (it keeps the return button)

Unfortunately I don't have access to the phone (a user did some testing) 
so I can't debug.


Any ideas?

Michael

--



HTC Desire keyboard problem

by jamesc » Sun, 18 Apr 2010 21:43:52 GMT


 Hi Michael

It'll be the Sense UI's IME which has different behaviour to the stock
Android IME. Sadly, I'd suggest that you get your hands on a Sense UI-
equipped device (even a Hero, which whilst it has 1.5 on it, may help
you track that issues).

When you say that ACTION_UP doesn't work, is this for all key presses,
or just some in particular?  A bit more information on what you're
attempting to capture with ACTION_UP would be helpful in order to
allow to to get some useful debug prints out.



>


Sponsored Links


HTC Desire keyboard problem

by Michael Rueger » Mon, 19 Apr 2010 16:15:38 GMT


 

Hi Michael It'll be the Sense UI's IME which has different behaviour to the stock Android IME. Sadly, I'd suggest that you get your hands on a Sense UI-
Thanks for the hint, I found this issue for the problem: http://code.google.com/p/android/issues/detail?id=2882& ;q=htc%20ime&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars
equipped device (even a Hero, which whilst it has 1.5 on it, may help you track that issues).
I'm afraid so...
When you say that ACTION_UP doesn't work, is this for all key presses, or just some in particular? A bit more information on what you're attempting to capture with ACTION_UP would be helpful in order to allow to to get some useful debug prints out.
See code below, very simple one digit entry fields. (any tips for achieving that more elegantly appreciated :-) ). On the HTC the focus doesn't move to the next field on a key press (the user tells me), so I'm assuming somehow the key event doesn't make it. Michael digit2.setOnKeyListener(new View.OnKeyListener() { @Override public boolean onKey(View v, int keyCode, KeyEvent event) { if (event.getAction() == KeyEvent.ACTION_UP) { if (event.getKeyCode() == KeyEvent.KEYCODE_DEL) { digit1.requestFocus(); } else { digit3.requestFocus(); } } return false; } }); --



HTC Desire keyboard problem

by jamesc » Tue, 20 Apr 2010 04:52:32 GMT


 Perhaps your 'digit2' View doesn't have focus at the point where input
is being requested?






>



HTC Desire keyboard problem

by jamesc » Wed, 21 Apr 2010 13:31:29 GMT


 The solution is that you shouldn't use onKey() but implement an
InputConnection to handle key presses:





HTC Desire keyboard problem

by Michael Rueger » Wed, 21 Apr 2010 14:35:45 GMT


 

The solution is that you shouldn't use onKey() but implement an InputConnection to handle key presses:



Other Threads

1. Android on devices without batteries - unlock screen problem

Hi,

I am trying to port Android (2.2_r1.1) to an ARM11 board which runs on
AC power (no batteries!!) and where im using a USB keyboard as input
device.

So far, Android initializes without problems and I get to the first
screen when you have to press MENU to unlock it. I have modified the
qwerty.kl file so that MENU is mapped to F5 key.

qwerty.kl:
key 63    MENU              WAKE_DROPPED

(NOTE: also tried with WAKE instead of WAKE_DROPPED)

When I press the F5 key i see this on the logcat log:

D/KeyguardViewMediator(  702): wakeWhenReadyLocked(82)
D/KeyguardViewMediator(  702): handleWakeWhenReady(82)
D/KeyguardViewMediator(  702): pokeWakelock(5000)
I/power   (  702): *** set_screen_state 1

It seems that KeyguardViewMediator is receiving the MENU key correctly
(since that is the code in KeyEvent.java):

public static final int KEYCODE_MENU  = 82;

Therefore, the keyboard seems to be OK. Unfortunately the screen is
not unlocked!!

NOTE: I have also tried using the sendevent tool, but the result is
the same.

The android system that i built works correctly when i run it on the
Emulator (../android-sdk-linux_86/tools/emulator -avd avd22 -
system ....) where i can unlock the screen without problems, for
example using the sendevent or using the artificial keyboard in the
emulator.

I tried to put the same fake battery properties in the init.rc for the
board:

    setprop status.battery.state Slow
    setprop status.battery.level 5
    setprop status.battery.level_raw  50
    setprop status.battery.level_scale 9

But nothing changed...

So far, my conclusion is that the problem is probably related with the
wakelocks and the lack of batteries or appropriate power management
support for my board. The reason for thinking that is that in the
Emulator, the messages that appear when i press the MENU key is just:

D/KeyguardViewMediator(   61): pokeWakelock(5000)

That is, no message related to set_screen_state as it happens in the
board.

In the kernel (android-2.6.32) i have selected a generic power driver
because i dont have any battery and this options (of course, android
drivers such IPC binder, low memory killer etc are enabled):

CONFIG_POWER_SUPPLY=y
CONFIG_PDA_POWER=y
CONFIG_PM=y
CONFIG_HAS_WAKELOCK=y
CONFIG_HAS_EARLYSUSPEND=y
CONFIG_WAKELOCK=y
CONFIG_WAKELOCK_STAT=y
CONFIG_USER_WAKELOCK=y
CONFIG_EARLYSUSPEND=y
CONFIG_CONSOLE_EARLYSUSPEND=y

These are the error messages related to the batteries at
initialization time:

E/BatteryService(  702): acOnlinePath not found
E/BatteryService(  702): usbOnlinePath not found
E/BatteryService(  702): batteryStatusPath not found
E/BatteryService(  702): batteryHealthPath not found
E/BatteryService(  702): batteryPresentPath not found
E/BatteryService(  702): batteryCapacityPath not found
E/BatteryService(  702): batteryVoltagePath not found
E/BatteryService(  702): batteryTemperaturePath not found
E/BatteryService(  702): batteryTechnologyPath not found
...
E/SurfaceFlinger(  702): Couldn't open /sys/power/wait_for_fb_sleep
or /sys/power/wait_for_fb_wake

NOTE: the last one and the ones about  usbOnlinePath,
batteryVoltagePath and batteryTemperaturePath appear also in the
emulator version

Could somebody give me a hint of what should i do to make it work?

Could it be related to the wakelocks and the fact that the device
doesnt have batteries?

Is there any way to fake the batteries without modifying the code of
the KeyGuard java file?

Note: in the emulator case, i can see some code related to power in
hardware/libhardware_legacy/power/. Should i write something like
that?

Thanks in advance
Daniel

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. Is it possible to create a custom system image for any currently released commercial hardware phone/netbooks?

We're creating some software that is going to require a few tweaks to
the Linux kernel and thus to run it on hardware we'll have to create a
custom system image.

In order for this to be useful as a commercial product it'll therefore
almost certainly have to be necessary to work in conjunction with a
network-operator or/and phone/netbook manufacturer.
However that's not important for the moment, the first step is to
create a demo/proof of concept of the software running on actual
hardware.

The hardware for demo purposes should be an actual phone ideally, not
a piece of obscure reference hardware for example, however is it
actually possible to create a custom system image for a phone? My
opinion is that its not - going to be possible because the image will
need to contain drivers specific to the hardware (screen drivers,
modem drivers, etc.) and these aren't going to be available for
inclusion in the image.

Is there any way we can create a custom system image for a currently
(or shortly to be released) phone and successfully re-flash the
hardware and it'll run?

TIA

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

3. CursorAdapter Problem

4. Viewable Address Field for People Contact truncated

5. Sign in error habis matikan dan hidupin spica

6. GPS satellite icon

7. Pasar malem