Good I am developing an application that needs to write in text boxes of another application, I would like to know how it could be written in a text box with code.
Good I am developing an application that needs to write in text boxes of another application, I would like to know how it could be written in a text box with code.
Out of tests, you can create a MotionEvent
and use dispatchTouchEvent
if you know and you can access the Activity
or View
.
MotionEvent e = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_DOWN, x, y, metaState);
dispatchTouchEvent(MotionEvent);
The parameters are:
moments are obtained based on SystemClock.uptimeMillis()
.
To get examples of these events you could do an @Override in a view or activity at dispatchTouchEvent(MotionEvent e)
(do not forget to call super(e)
).