MultiVentana Support for the App on Samsung's TouchWiz (Android)

2

Today I have been moving my apps on a Samsung tab S2 device that has multiventana, but when I try to get my app to see a part of the screen I get a message, the app does not support multiventana.

What directives should be put in AndroidManifest.xml for multiventana support?

Edited I found the following thread in XDA , but I can not mess it up since I do not have any Samsung with the multiwindow functionality of your customization layer TouchWiz .

If someone can fiddle and put the AndroidManifest.xml in an answer, it would be appreciated.

If an animation is added to see how it fits.

    
asked by Webserveis 03.09.2016 в 21:08
source

2 answers

2
  

Add support for Samsung / Android Multi-Window (MultiTasking - MultiWindow) to your applications.

The problem or drawback of many applications is that they do not support or do not yet support the functionality.

Developers: This is what you need to do to add support to your applications!

It's actually quite easy. In your AndroidManifest.xml , do the following:

Make your application appear in the Multi-Window bar. Add the intention category MULTIWINDOW_LAUNCHER to the main activity launcher of the application, just below the 'android.intent.category.LAUNCHER' line, add:

<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />

Indicates that you are using the Multi-Window library. Include the following just before your </application> close the tag:

<uses-library required="false" name="com.sec.android.app.multiwindow"> </uses-library>

Add the metadata to indicate that your application supports Multi-Window. Add the following metadatos again just before </application> close the tag:

<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
  

Specify the size of the default window.

You must specify the default sizes of the Multi-Window configuration using the metadatos tags / additional entries in dimens.xml .

dimens.xml shows the default values taken from the Samsung Gallery application, conforms to your needs if necessary. ;).

Add the metadatos again just before </application> close the tag:

<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:resource="@dimen/app_defaultsize_w" />

<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:resource="@dimen/app_defaultsize_h" />

<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W" android:resource="@dimen/app_minimumsize_w" />

<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H" android:resource="@dimen/app_minimumsize_h" />[/code]

and in your dimens.xml :

[code]<dimen name="app_defaultsize_w">632.0dip</dimen>

<dimen name="app_defaultsize_h">598.0dip</dimen>

<dimen name="app_minimumsize_w">632.0dip</dimen>

<dimen name="app_minimumsize_h">598.0dip</dimen>
  

Additional documentation is in English but surely provides more information to become friends with the functionality.

I hope this guide will help you and solve the problem and everyone who goes through something similar.

Greetings!

    
answered by 15.09.2016 / 19:50
source
2

Hello friend I think you mean MultiTasking op MultiWindow, similar to what you have in iOS 9,

What is needed mainly is:

  • Change your targetSDK to 24 (it may be 23 or less with certain considerations).
  • Add the property android:resizableActivity="true" within the AndroidManifest.xml, this can be for the application or for an Activity.

link

    
answered by 04.09.2016 в 05:17