3

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?

0

2 Answers 2

2

You can accomplish with automation. Using Automate to demonstrate how to do it:

  1. Select the Broadcast Receive block. Click on it, in the Action section, select "Boot completed". Click Done.
  2. Select App Start block. Click on it, in the Package section, select the first app you wish to start at boot. Click Done.
  3. 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.
  4. 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.
  5. Select App Start block. Click on it, in the Package section, select the second app you wish to start at boot. Click Done.
  6. Save and give it a name. Link the blocks as seen on the image below.
  7. In the Settings, select "Run on system startup".
  8. Don't forget to give the necessary permissions when asked. Press start.

IMG:

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

2
  • In 2023 Automate UI for Interact blocked is different (screenshot) :( any hints on what to do with XPath expression instead of UI Element Class and and UI Element Text are much appreciated Jan 16, 2023 at 16:41
  • @user2761076 Unfortunately, I have never experimented with XPath directly (although I think it was also there when I answered). I use the Record Interactions button to record what I want to do. You might get better help checking Interact documentation. Jan 17, 2023 at 5:39
0

Reddy's answer above works great, BUT you need to place another link between the "OK" of your second app and the "IN" of the receive broadcast or else it will work for your next reboot cycle, but then end and not work in the future.

Further, you must make sure you have enabled "Run on system startup" in the general Automate settings menu.

Image of extra link needed:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .