Auto start two apps on split screen after reboot


Question

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?



Answer

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


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes