Hi,

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);

I have tried both Instrumentation and dispatchTrackballEvent.  Nothing seems
to work.  I am in a midsts of a deadline.

Please, Any help is highly appreciated.

Thanks,
Ankur
On Sun, Dec 26, 2010 at 7:05 PM, vikram jain <[email protected]>wrote:

> make use of touch event for mouse event
>
> On Mon, Dec 27, 2010 at 1:21 AM, Ankur Avlani <[email protected]>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 [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]<android-developers%[email protected]>
>> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> 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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to