How to differentiate a tap event generated by system or by user

by ankit » Mon, 06 Dec 2010 12:57:09 GMT


Sponsored Links
 Hi All,

Urgently needed help on this.
Actually i am recording and playing a sequence of events using
getevent and sendevent class,
now while playing the recorded events. Now while playing the recorded
events i want to know if any new tap event is generated by user. So is
there any way to differentiate a tap event generated by system or by
user. Also is there any way to decode the raw data provide by the
kernel to get this information.

Any Kind of suggestions would be of great help to me..
Thanks in advance....

regards
Ankit

-- 



How to differentiate a tap event generated by system or by user

by ankit » Mon, 06 Dec 2010 13:06:25 GMT


 Hi All,

Urgently needed help on this.
Actually i am recording and playing a sequence of events using
getevent and sendevent class,
now while playing the recorded events. Now while playing the recorded
events i want to know if any new tap event is generated by user. So is
there any way to differentiate a tap event generated by system or by
user. Also is there any way to decode the raw data provide by the
kernel to get this information.

Any Kind of suggestions would be of great help to me..
Thanks in advance....

regards
Ankit

-- 


Sponsored Links


Re: How to differentiate a tap event generated by system or by user

by XC He » Mon, 06 Dec 2010 13:16:32 GMT


 is there any tap event generated not by user's taping behavior?

2010/12/6 ankit <ankit.ag...@gmail.com>:

-- 



Re: How to differentiate a tap event generated by system or by user

by Leon Moreyn-Android Development » Tue, 07 Dec 2010 01:07:25 GMT


 when you drop the phone?




-- 



Re: How to differentiate a tap event generated by system or by user

by Vinay » Tue, 07 Dec 2010 10:57:36 GMT


 Hi,

I have come across one situation where it is required to know.

I'm using a check-box to handle turning on/off bluetooth. In case the
bluetooth is already on (through Wireless & Network -> Bluetooth ->
turn On), then in my custom application the check-box should be
checked indicating blueooth is already on.

So setting the check-box checked programatically will again trrigger
the event handler.

Even I would like to know how I can differentiate even being generated
by system and user. I think java swings does support that, but dont
know if some thing such is available with android sdk..

Vinay.



On Dec 6, 10:07pm, Leon Moreyn-Android Development




-- 



Re: Re: How to differentiate a tap event generated by system or by user

by Frank Weiss » Tue, 07 Dec 2010 12:41:16 GMT


 Sounds a bit like an MVC problem. If the checkbox view is bound to a model
(adapter), only the user should be creating tap events. To programmatically
change the checkbox, change its state in the model.

-- 



Other Threads

1. Nexus S boot problems

Hi,

I have built an unmodified kernel for the Nexus S but when I run it I
see the following error in my logcat output:

ERROR/FramebufferNativeWindow(190): couldn't open framebuffer HAL (No
such device)

- so although I can still adb shell onto the handset my boot has
failed at this point.


I am building an unmodified kernel as follows:

git clone git://android.git.kernel.org/kernel/samsung.git
cd samsung
make ARCH=arm CROSS_COMPILE=~/mydroid/prebuilt/linux-x86/toolchain/arm-
eabi-4.4.3/bin/arm-eabi- herring_defconfig
make ARCH=arm CROSS_COMPILE=~/mydroid/prebuilt/linux-x86/toolchain/arm-
eabi-4.4.3/bin/arm-eabi-

~/mydroid/out/host/linux-x86/bin/mkbootimg --cmdline 'console=ttyFIQ0
no_console_suspend' --base 0x30000000 --pagesize 4096 --kernel zImage
--ramdisk mtd2.img-ramdisk.gz -o boot.img

where -
mtd2.img-ramdisk.gz was extracted from the mtd2 image from my Nexus S
using split_bootimg.pl.
~/mydroid contains my gingerbread build
my build environment is Ubuntu 10.10 64bit in a VM

Can anyone suggest what I'm doing wrong? Thanks very much.

----------------------------------------------------------------------------------------------------------------------------------------------------
Here's the pertinent part of my boot log

03-16 09:58:04.113: INFO/Zygote(188): ...preloaded 1830 classes in
2016ms.
03-16 09:58:04.113: ERROR/Zygote(188): setreuid() failed. errno: 17
03-16 09:58:04.128: DEBUG/dalvikvm(188): GC_EXPLICIT freed 18K, 52%
free 2460K/5123K, external 0K/0K, paused 17ms
03-16 09:58:04.132: INFO/Zygote(188): Preloading resources...
03-16 09:58:04.148: DEBUG/dalvikvm(188): GC_EXTERNAL_ALLOC freed <1K,
52% free 2462K/5123K, external 0K/0K, paused 17ms
:
03-16 09:58:04.386: DEBUG/dalvikvm(188): GC_EXPLICIT freed 1K, 51%
free 2526K/5123K, external 1625K/2137K, paused 17ms
03-16 09:58:04.390: INFO/dalvikvm(188): System server process 190 has
been created
03-16 09:58:04.390: INFO/Zygote(188): Accepting command socket
connections
03-16 09:58:04.449: INFO/sysproc(190): Entered system_init()
03-16 09:58:04.449: INFO/sysproc(190): ServiceManager: 0x128df8
03-16 09:58:04.449: INFO/SurfaceFlinger(190): SurfaceFlinger is
starting
03-16 09:58:04.449: INFO/SurfaceFlinger(190): SurfaceFlinger's main
thread ready to run. Initializing graphics H/W...
03-16 09:58:04.453: ERROR/FramebufferNativeWindow(190): couldn't open
framebuffer HAL (No such device)
03-16 09:58:04.554: INFO/DEBUG(75): *** *** *** *** *** *** *** ***
*** *** *** *** *** *** *** ***
03-16 09:58:04.554: INFO/DEBUG(75): Build fingerprint: 'google/soju/
crespo:2.3.1/GRH78/85442:user/release-keys'
03-16 09:58:04.554: INFO/DEBUG(75): pid: 190, tid: 198  >>>
system_server <<<
03-16 09:58:04.554: INFO/DEBUG(75): signal 11 (SIGSEGV), code 1
(SEGV_MAPERR), fault addr 0000005c


-- 

2. Nexus S kernel not booting after compile

after compiling the kernel...

at the end I used the command

"fastboot boot boot.img"

and it sits there at the google logo, padlock unlocked bewlow with a
message overlapping it saying "FASTBOOT STATUS - OKAY" and thats it...
nothing happens after that.

If I use "fastboot boot ./kernel ./initramfs.cpio.gz" same thing
happens except the message "FASTBOOT STATUS - OKAY" is not showing...

any suggestions?

the scripts I use are these

#build_kernel
#!/bin/sh

export ARCH=arm
export CROSS_COMPILE=/home/sinatosk/android_manifest/prebuilt/linux-
x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-

cd samsung/

make clean
make -j4

cp arch/arm/boot/zImage ./kernel

cd ..

exit 0

#build_initramfs
#!/bin/sh

cd herring_initramfs/
find | fakeroot cpio -o -H newc | gzip -9 > ../initramfs.cpio.gz
cd ..

#build_boot
#!/bin/sh

./mkbootimg \
--kernel ./kernel \
--ramdisk ./initramfs.cpio.gz \
--base 0x30000000 \
--pagesize 4096 \
-o ./boot.img

thanks

-- 

3. bug or a feature?

4. Creating integer array of resource ids

5. AWT - yes or no??!

6. Tracing Geo Location and saving them into file from start of a cal to end call duration

7. Resolution Problem