Alternative to swipe in element for Android

The problem
Alternative to swipe in element for Android

Appium version (or git revision) that exhibits the issue: v1.8.0-beta3
Desktop OS/version used to run Appium: mac
Node.js version (unless using|exe):v8.5.0
Mobile platform/version under test: Android
Real device or emulator/simulator: Real device, 7.1

I’m trying to do a swipe in element (not normal swipe) on android. And it seems that i cannot…
I have a list of tariffs and i want to swipe to delete one of them.

I also tried to do something as on iOS, but nothing happens:

 * Mobile Swipe in Element using JS
 * @param direction direction: Either 'up', 'down', 'left' or 'right'
public static void mobileSwipeInElement(RemoteWebElement element, String direction) {
    JavascriptExecutor js = Drivers.getMobileDriver();
    Map<String, Object> params = new HashMap<>();
    params.put("element", element.getId());
    params.put("direction", direction);
    js.executeScript("mobile: swipe", params);

Any suggestions?

    Use TouchAction, below is the sample code.

TouchAction touchAction =new TouchAction(driver);
Dimension size = driver.manage().window().getSize();
int y1 = (int) (size.getHeight() * .20);
int x1 = (int) (size.getWidth()*.50);
int y2 = (int) (size.getHeight() * .80);

        touchAction.longPress(x1, y2).moveTo(x1, y1).release().perform();

that is for whole page