I edit the input package to add the motionevent emulator.

maybe you can see the framework/base/cmds/input source code.

It's very simple.


于 2010年11月27日 08:12, Ankur Avlani 写道:
> Hi All,
>
> Thanks for the response. Does anyone have any running example for
> moving mouse programatically in android using MotionEvent or any other
> class?.
>
> -Ankur
>
> On Fri, Nov 26, 2010 at 3:53 PM, Olivier Guilyardi <[email protected]
> <mailto:[email protected]>> wrote:
>
>     On 11/27/2010 12:42 AM, Olivier Guilyardi wrote:
>     > On 11/27/2010 12:26 AM, Mark Murphy wrote:
>     >> On Fri, Nov 26, 2010 at 6:02 PM, Ankur Avlani
>     <[email protected] <mailto:[email protected]>> wrote:
>     >>> Is there a way to simulate mouse event in android. My Idea is
>     in android
>     >>> move the mouse based on x, y corodinates supplied.
>     >> There is no mouse in Android.
>     >
>     > You can plug a mouse into a beagle board. It's also mentioned in
>     the MotionEvent
>     > doc:
>     > http://developer.android.com/reference/android/view/MotionEvent.html
>     >
>     > Ankur, check out onTouchEvent() and onTrackballEvent():
>     >
>     
> http://developer.android.com/reference/android/view/View.html#onTouchEvent(android.view.MotionEvent)
>     
> <http://developer.android.com/reference/android/view/View.html#onTouchEvent%28android.view.MotionEvent%29>
>
>     .. or the Testing doc, which mentions "the ability to send a
>     keystroke or touch
>     event to the UI of the application under test":
>
>     
> http://developer.android.com/intl/fr/guide/topics/testing/testing_android.html
>
>     --
>     Olivier
>
>     --
>     You received this message because you are subscribed to the Google
>     Groups "Android Discuss" group.
>     To post to this group, send email to
>     [email protected]
>     <mailto:[email protected]>.
>     To unsubscribe from this group, send email to
>     [email protected]
>     <mailto:android-discuss%[email protected]>.
>     For more options, visit this group at
>     http://groups.google.com/group/android-discuss?hl=en.
>
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "Android Discuss" 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-discuss?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Discuss" 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-discuss?hl=en.

Reply via email to