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.

--