Launch app after reboot

I have a scenario like this:

  1. My capabilities are:
    platformName: Android deviceName: Android appPackage: com.demos.app appActivity: com.demos.app.activities.HomeActivity appWaitActivity: com.demos.app.activities.EnvironmentActivity,com.demos.app.activities.MainActivity app: myapp.apk noReset: true newCommandTimeout: 120
  2. Once the app is launched, click a button on EnvironmentActivity which navigates to MainActivity
  3. Reboot the device
  4. Launch the app again and verify the MainActivity is displayed.

Since autoLaunch is true by default, if we give multiple appWaitActivities separated by comma, appium treats that. However, the launchApp is not considering the appWaitActivity array, instead considering as a single string. Because of this, the launchApp after the reboot fails for me.