I am trying to disable multi window feature of android. I have read the android documentation and know that resizeableActivity would only work for android N (API level 24) but I want to disable it on lower level android APIs. As Samsung devices have multi window feature on its all device (approx). So I have to disable it.
Another way to exit multi-window mode is to long-press the “recent apps” button until the secondary app closes, leaving you with only the primary app open in single-window mode.
Multi-window mode enables multiple apps to share the same screen simultaneously. Apps can be side by side or one above the other (split-screen mode), one app in a small window overlaying other apps (picture-in-picture mode), or individual apps in separate movable, resizable windows (free-form mode).
Multi-window's default experience is split-screen mode, where the System UI is divided down the middle of the device in portrait or landscape. Users can resize the window by dragging the dividing line side to side or top to bottom, depending on the device orientation.
You cannot do that in runtime. Your application either supports multi window mode, or it doesn't. Parameters, that are given in AndroidManifest.xml
cannot be changed during runtime.
From the documentation of android:resizeableActivity
:
If this attribute is set to true, the activity can be launched in split-screen and freeform modes. If the attribute is set to false, the activity does not support multi-window mode. If this value is false, and the user attempts to launch the activity in multi-window mode, the activity takes over the full screen.
For specifically Samsung devices you can try putting this in manifest file:
<meta-data android:name="com.sec.android.support.multiwindow" android:value="false" />
<meta-data android:name="com.samsung.android.sdk.multiwindow.multiinstance.enable"
android:value="false" />
<meta-data android:name="com.samsung.android.sdk.multiwindow.penwindow.enable"
android:value="false" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With