WhatsApp opening to wrong screen

When I’m launching WhatsApp through Appium, I always get sent to the following:

My relevant code is as follows:

import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.remote.DesiredCapabilities;

import io.appium.java_client.AppiumDriver;
import io.appium.java_client.MobileElement;
import io.appium.java_client.android.AndroidDriver;

public class WA1 {

AppiumDriver driver;
String path;

public void setup() {

  //prints at the beginning
  System.out.println("Session is creating");
  //sets up required capabilities
  path = System.getProperty("user.dir");
  DesiredCapabilities cap = new DesiredCapabilities();
  cap.setCapability("platformName", "Android");
  //cap.setCapability("platformVersion", "4.1");
  cap.setCapability("deviceName", "Galaxy on7");
  cap.setCapability("appPackage", "com.whatsapp");
  cap.setCapability("appActivity", path+"//app//WhatsApp.apk");
  try {
  	driver = new AndroidDriver<MobileElement>(new URL(""), cap);
  } catch (MalformedURLException e) {
  	// TODO Auto-generated catch block
  driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
  //prints afterwards
  System.out.println("Session is created");


I think it may be the wrong appActivity, but I’m not sure what to list if not that.

by default appium does reset of your app. look for link for fix when you start driver - Different capabilities for different scenarios

Thanks! In java, is it just cap.setCapabilitiy(“noReset”, true), or something to that effect?

example is also in java. but version is latest which have defined “noReset” as constant. but you can use just “noReset” also.