Not able to perform horizontal swipe - 1.7.2

Hi tany

moveTo(point(-finalendx,endy)) here -finalendx is - (negative sign)required here

yes, it’s required here if you use appium 1.7.2

Sorry which part uiautomator2 or the -negative sign (-finalendx)

u need to use -ve sign

Thanks… dimension size (540, 888)

following co-ordinates i have put still it does not work

public void swipeRightToLeft() {
getDriver().manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS);
Dimension size = getDriver().manage().window().getSize();
System.out.println(size);

int startx = (int) (size.width *0.40);
int endx = (int) (size.width *0.20);
int starty = size.height / 2;
int finalendx = startx-endx;
int endy = 0;

TouchAction actions = new TouchAction(getDriver());
actions.press(point(270,444)).waitAction(waitOptions(Duration.ofMillis(2000))).moveTo(point(-finalendx,endy)).release().perform();

Can anyone please provide me any solution to swipe in java client 5.0.4;)

im getting the following exception

org.openqa.selenium.interactions.InvalidCoordinatesException: The coordinates provided to an interactions operation are invalid. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds

can anyone help me out please

How to automate Swipe in android, I am still not able to get the final conclusion. On the screen it is banner and only way I can comeout is swipe 4 time (view all 4 banners) and then Login appeared. So please suggest how to automate.

Note: This is bannner so I can’t locate the element.