6

If android work on split-screen mode, I can open the app in the second part of the screen.

But if android work on normal mode, I can't open the app in split-screen mode.

In android normal mode, How to use intent to open the other app in split-screen mode?

  • You may find your answer here: [https://stackoverflow.com/questions/37907094/programmatically-open-app-in-split-screen](https://stackoverflow.com/questions/37907094/programmatically-open-app-in-split-screen) – Mahmoud Afarideh Jan 31 '21 at 08:37
  • This solution is only work when android split screen mode actived – Hoàng Văn Lộc Jan 31 '21 at 11:28
  • As far as I know, opening app in split-screen mode requires both apps to support this feature. If the app you want to open in split-screen mode does not support it, you cannot force it to open in that mode through an intent. – Joshua Ooi Feb 18 '23 at 16:24

1 Answers1

-1

You can use Intent with FLAG_ACTIVITY_LAUNCH_ADJACENT to open the app in split mode.

Example

Intent i = getPackageManager.getLaunchIntentForPackage("package of the app you want to launch");
i.setFlags(Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT | Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
Waseem
  • 439
  • 3
  • 18