title: How to programmatically trigger the touch event in android?
body: <p>I would like to trigger a touch event like this:</p>
  
  <p>First the finger is touch down at the (0,50%) of the screen and slide to the (50%,50%) of the screen, and exit (move the finger off the screen)</p>
  
  <p>I have found some thing like this:</p>
  
  <pre><code>MotionEvent event = MotionEvent.obtain(downTime, eventTime, action, x, y, pressure, size, metaState, xPrecision, yPrecision, deviceId, edgeFlags);
  
  onTouchEvent(event);
  </code></pre>
  
  <p>However, how to emulate the above case? Do I need to create 2 event ? onTouchDown , onMove etc.... ? Thanks for helping.</p>