implement keypad and touchscreen driver on emulator

by bryan » Mon, 27 Dec 2010 23:58:47 GMT


Sponsored Links
 Hi All,
I have a stupid question need you guys' help
Is it possible to simulate the touch screen event on android emulator?
Since I do not have real device to do this, I want to simulate the
event on emulator first.

If yes, how do I get started?
I tried to hook kernel image when runnig emulator. But log seems not
correct.(see following portion of logcat)

I/EventHub(   59): New keyboard: device->id=0x10000 devname='qwerty2'
propName='hw.keyboards.65536.devname' keylayout='/system/usr/keylayout/
qwerty.kl'
I/EventHub(   59): New device: path=/dev/input/event0 name=qwerty2
id=0x10000 (of 0x1) index=1 fd=52 classes=0x2f
E/EventHub(   59): could not get driver version for /dev/input/mouse0,
Not a typewriter
E/EventHub(   59): could not get driver version for /dev/input/mice,
Not a typewriter
I/KeyInputQueue(   59): Device added: id=0x0, name=qwerty2, classes=2f
I/KeyInputQueue(   59):   X: unknown values
I/KeyInputQueue(   59):   Y: unknown values
I/KeyInputQueue(   59):   Pressure: unknown values
I/KeyInputQueue(   59):   Size: unknown values
I/KeyInputQueue(   59): No virtual keys found

evne the keylayout nor the keychar are not what I expect to see
(I have register my keylayout and keychar in system.prop)

The final result I want to see is when I tap the mouse left key on
emulator software keyboard,
the logcat can display the X-Y coordinate and mapping keychar

The kernel version I use is android-goldfish-2.6.29, config is
goldfish_defconfig
Can anybody give me some clue? Any information will be helpful for me.

Thank you so much

-- 



Other Threads

1. problem with edittext

Hello all,

I have a made simple calculator let say from dollar to euro.

There are two radiobuttons and two edittext entries one for dollar and one
for euro .

And there is one calculate button.

I select one radio button (dollar) fill in a value for dollar and press
calculate.
The value of euro appears in the edittext entry.

When i now select the radio button for euro and leave the first calculated
value in the  edittext entry
the application will close.

But when i first remove the calculated value and put in by hand and press
calculate it runs fine.

The emulator does not show this probem.

To try it out download mwcalculator_lite and chose reflectometer calculator.


Faust

-- 

2. Programmatically forward-lock an APK?

Doing a bit of advance research, and am stuck on the point summarized
in the title. Namely, is there any way to forward-lock an APK
installed programmatically, from another app? I've not come across
anything beyond a hint in the following post:

3. Looking for someone to test my Augmented Reality software on the milestone

4. How to create a nice menu?

5. AutoCompleteTextView / ArrayAdapter performance

6. Is it possible to publish two versions for the same app simultaneously?

7. Always use the best Location Provider?