Code example for MotionEvent

Methods: getAction

    /** Called whenever the user touches the touchscreen */ 
//    @Override 
    public boolean onTouch(View v, MotionEvent m) {
        // Ignore finger movement event, we just care about when the finger first touches the screen. 
        if (m.getAction() != MotionEvent.ACTION_DOWN) {
            return false;   // We didn't do anything with this touch movement event. 
        Log.i(TAG, "onTouch down event");
        // Signal that we should cartoonify the next camera frame and save it, instead of just showing the sketch. 
        return false;