-1

I can manually open my two apps in Split screen view, using the Recent apps button.

I believe I have added the "split screen support" in my apps, as per How to enable split screen in my Android app?

My targetSdkVersion is 29 and I have set resizeableActivity="true" in tag

Now I want to have one launcher to open both apps. I am using this open source app SplitScreenLauncher to launch my app. Following are the observations:

  1. When I launch my two apps, using SplitScreenLauncher, it attempts to open them in split screen but then it immediately closes the 2nd app (I tried swapping the apps). It shows no error/message.

  2. I try YouTube and Instagram. It clearly says "Your app doesn't support split screen" for Instagram.

  3. I tried YouTube and Google Maps, it works.

  4. When I use YouTube as first and MyApp as second app in SplitScreenLauncher, then it works. And if I use MyApp as first and YouTube as second app, then it doesn't work (acts like step 1). This is true for both of my apps, I tried one by one.

I have tried some tweaking in the code of this open source app, I don't understand why it doesn't work for my app.

In my app, I have removed any orientation restrictions in all activities, so it is auto rotate able.

What could be the issue?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
M. Usman Khan
  • 3,689
  • 1
  • 59
  • 69

2 Answers2

1

I found the problem. It was in my Apps, both apps unfortunately. After Splash screen, I was doing startActivity() after finish(). finish() was closing all activities before i could start new, so split screen was going away. Now I finish() after startActivity(), and it works.

M. Usman Khan
  • 3,689
  • 1
  • 59
  • 69
0

Try adding this line in your activitiies in manifest file

        android:resizeableActivity="true"
Abdur Rahman
  • 894
  • 1
  • 11
  • 27