you need switch to:new TouchAction(this).press(startx, starty).waitAction(duration).moveTo(endx, endy).release().perform();
some other example may look here - https://github.com/appium/java-client/blob/master/src/test/java/io/appium/java_client/android/AndroidTouchTest.java458