Auto start two apps on split screen after reboot I have Two running Android apps (used for surveillance and doorbell) permanently and simultaneously on split screen.

Sometimes, the person who used the device (for personal purposes) forget to get everything back, or maybe something else happens, so it is necessary to:


Close all recent unnecessary apps.
Launch surveillance and doorbell apps in split screen.



  Is it possible to reboot the system every night automatically, then launch the two apps on the split screen?
You can accomplish with automation. Using Automate to demonstrate how to do it:


Select the Broadcast Receive block. Click on it, in the Action section, select "Boot completed". Click Done.
Select App Start block. Click on it, in the Package section, select the first app you wish to start at boot. Click Done.
Select the Interact block.  Click on it, in the Action section, Toggle split screen (Android 7+). In the Package section, select com.android.systemui. Type android.widget,ImageView in the "UI Element Class" section, then type Recent Apps in the "UI Element Text" section. Click Done.
Select the Delay block, in the Duration section set time the amount of time the flow will wait before continuing to the next block (we wait for the first app to start properly before opening the second). I have set it to 5 seconds.
Select App Start block. Click on it, in the Package section, select the second app you wish to start at boot. Click Done.
Save and give it a name. Link the blocks as seen on the image below.
In the Settings, select "Run on system startup". 
Don't forget to give the necessary permissions when asked. Press start.




Every time you reboot your device, after the boot has been completed, the first app will be launched. Then, the screen will be split based on Recent apps with the first app occupying the top part of the screen. After a 5 second delay, the second app will be launched occupying the other part of the screen.

The flow was inspired by this example: Split screen Google Maps/Deezer