I tried to use the touch event, but it doest seem to work.
Please find my code snippet below:
Instrumentation inst = new Instrumentation();
long downTime = SystemClock.uptimeMillis();
long eventTime = SystemClock.uptimeMillis();
MotionEvent me = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_MOVE,
(xy[0]+(xOffset*sensitivity)),(xy[1]+(yOffset*sensitivity)), 0);
dispatchTrackballEvent(me);
onTouchEvent(me);
me.recycle();
inst.sendPointerSync(me);
Please, Any help is highly appreciated.
Thanks,
Ankur
-- On Sun, Dec 26, 2010 at 7:05 PM, vikram jain <vikram.jain.iiitb@gmail.com> wrote:
make use of touch event for mouse event
On Mon, Dec 27, 2010 at 1:21 AM, Ankur Avlani <ankuravlani@gmail.com> wrote:
--Hi All,I am trying to build a server android, which will take keyboard and mouse actions, and pass it on to the appropriate view. So far I am successful in getting keyboard events. But I need some help in generating the mouse/motion events. Can someone throw some light on how will that work.Any help is highly appreciated.Thanks,Ankur.
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
No comments:
Post a Comment