Hi,
I need to set the Native app in background and than get the same app in foreground with same opened page which I have last visited.
Here I am able to set the app in background by below code but not finding the way to get the app in foreground with last visited page, currently with below code approaches, the app is getting relaunched with initial login screen. Can any one please help in same.
Code1:
- driver.runAppInBackground(Duration.ofSeconds(15));
2.Activity activity = new Activity(“com.gisteam.rjiomaps.projectresq”, “com.gisteam.rjiomaps.projectresq.main.MapFragmentActivity”);//activity name is as per the last visited page
3.activity.setStopApp(false); - ((AndroidDriver) driver).startActivity(activity);
Code2
- driver.runAppInBackground(Duration.ofSeconds(15));
2.((AndroidDriver) driver).currentActivity();