Disable app to be launch in multi windows mode?

When I launch my app on android in multi screen mode with other app in the same time, there is a lot of trouble in my app… is it possible to unauthorize the multi window mode ?
Any idea to do this ?
Thanks

You can disable this by adding a string to your build.settings:

settings = { android = { supportsScreens = { resizeable = false, smallScreens = true, normalScreens = true, largeScreens = true, xlargeScreens = false, }, }, }

Of course set the screens to the ones you want to support.

Rob

Great !!

Where is this xml file ?

You do this through your build.settings. The build.settings is read and we update the AndroidManifest.xml for you.

So I can just set resizable to false and the 4 other option to true ? What if you set xlarge… to false ? If I run the game with a very big tab and a xlarge screen ?

That is not correct… Please see the Android documentation - https://developer.android.com/guide/topics/ui/multi-window.html#configuring.

The correct setting is 

android:resizeableActivity=["true" | "false"]

Who is not correct ? Me or rob ?
So what do you purpose as good code ? Thanks !

It seems we are linking to documentation that Google hasn’t updated.

Try:
 

settings = { android = { supportsScreens = { resizeableActivity = false, smallScreens = true, normalScreens = true, largeScreens = true, xlargeScreens = false, }, }, }

Hello Rob,

I used the attribute resizeableActivity but the emulator’s console displays this:
WARNING: unrecognized key: settings.android.

supportsScreens.resizeableActivity

So, the good attribute is: resizeable.
https://developer.android.com/guide/topics/manifest/supports-screens-element.html

But the whole of the code settings.android.supportsScreens that you give above, intended to be put in the build.settings doesn’t works. The multi-window mode stays active on Android smartphone and Tablet.
Note: I used the Corona SDK 2017.3113 and the last JDK to create device builds on actual Android devices as you mentionned here:  https://docs.coronalabs.com/guide/start/installWin/index.html

And I tried resizable to false and the 4 others options to true, and resizable to true and the 4 others options to false…

So, if I can’t unauthorized multi-window from build.settings, do you have another solution than unzip the .APK and making reverse engineering of the androidManifest.xml to modify attributes?
Maybe a solution here that I haven’t tried, but very bad solution: https://stackoverflow.com/questions/4191762/how-to-view-androidmanifest-xml-from-apk-file

Thank’s a lot Rob.

I’ve been doing a lot of experimentation on this and talking with Engineering.

Basically what was suggested above doesn’t work.  I’ve filed an enhancement request with engineering. I’m not sure the ETA on this getting added. They hinted that in the short term, it may be best just to disable split-screen for Corona apps. No ETA on that either.

Rob

What means ETA rob?
Do, in the next corona build, surely every app will be in “disable split screen” by default on android ?

ETA = Estimated Time of Arrival (or in our case Availability).

It’s short-hand for when we expect the feature to be available. It looks like daily build 2017.3117 now prevents Corona apps from running in split screen by default. We added an entry to build.settings that lets you enable split screen, though we’ve not done any work yet to help make your app work better in split screen. It’s also not a priority and if that’s of interest to you, it may be best to create a feature request at http://feedback.coronalabs.com

Rob

You can disable this by adding a string to your build.settings:

settings = { android = { supportsScreens = { resizeable = false, smallScreens = true, normalScreens = true, largeScreens = true, xlargeScreens = false, }, }, }

Of course set the screens to the ones you want to support.

Rob

Great !!

Where is this xml file ?

You do this through your build.settings. The build.settings is read and we update the AndroidManifest.xml for you.

So I can just set resizable to false and the 4 other option to true ? What if you set xlarge… to false ? If I run the game with a very big tab and a xlarge screen ?

That is not correct… Please see the Android documentation - https://developer.android.com/guide/topics/ui/multi-window.html#configuring.

The correct setting is 

android:resizeableActivity=["true" | "false"]

Who is not correct ? Me or rob ?
So what do you purpose as good code ? Thanks !

It seems we are linking to documentation that Google hasn’t updated.

Try:
 

settings = { android = { supportsScreens = { resizeableActivity = false, smallScreens = true, normalScreens = true, largeScreens = true, xlargeScreens = false, }, }, }

Hello Rob,

I used the attribute resizeableActivity but the emulator’s console displays this:
WARNING: unrecognized key: settings.android.

supportsScreens.resizeableActivity

So, the good attribute is: resizeable.
https://developer.android.com/guide/topics/manifest/supports-screens-element.html

But the whole of the code settings.android.supportsScreens that you give above, intended to be put in the build.settings doesn’t works. The multi-window mode stays active on Android smartphone and Tablet.
Note: I used the Corona SDK 2017.3113 and the last JDK to create device builds on actual Android devices as you mentionned here:  https://docs.coronalabs.com/guide/start/installWin/index.html

And I tried resizable to false and the 4 others options to true, and resizable to true and the 4 others options to false…

So, if I can’t unauthorized multi-window from build.settings, do you have another solution than unzip the .APK and making reverse engineering of the androidManifest.xml to modify attributes?
Maybe a solution here that I haven’t tried, but very bad solution: https://stackoverflow.com/questions/4191762/how-to-view-androidmanifest-xml-from-apk-file

Thank’s a lot Rob.