Is there any way to do the following process in android Automation using Appium with android driver?
Press home button from some specific screen. Put app in backgrou
public static void minimizeMaximize() {
try {
driver.runAppInBackground(10);
((AndroidDriver) driver).startActivity("appPackage", "appActivity");
} catch (Exception e) {
e.printStackTrace();
}
}
You have to enter your app package name and activity name to maximize the app. For Eg:
public static void minimizeMaximize() {
try {
driver.runAppInBackground(10);
((AndroidDriver) driver).startActivity("com.example.test", "com.example.LaunchApp");
} catch (Exception e) {
e.printStackTrace();
}
}
This will definitely work.