Sponsored Links
Recent Editorial
Recent Articles
Recent Article Comments
Sponsored Links
Recent Topics
Recent Replies
Developers: Add support for Samsung Multi Window to your apps
Oct 16 2012 01:30 PM |
PaulOBrien
in Android

Samsung's neat Multi Window functionality is making it's way into the wild... first with the Galaxy Note 2 and with the Galaxy S III to follow. This is great, but the downside is that not many apps support the functionality as yet. Developers - here's what you need to do to your app to add support!
It's actually rather easy. In your AndroidManifest.xml, do the following...
P
It's actually rather easy. In your AndroidManifest.xml, do the following...
- Make your application appear in the Multi Window bar. Add the MULTIWINDOW_LAUNCHER intent category to your application's main launcher activity... so just below your 'android.intent.category.LAUNCHER' line, add:
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
- Indicate you're using the Multi Window library. Include the following just before your </application> close tag:
<uses-library required="false" name="com.sec.android.app.multiwindow"> </uses-library>
- Add the metadata to indicate your application is Multi Window compatible. Add the following metadata again just before your </application> close tag:
<meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
- Specify the default window size. You should specify the default sizes for your Multi Window configuration using the additional metadata tags / dimens.xml entries below. The dimens.xml values below show the default values taken from Samsung's Gallery application, adjust for your needs if necessary.
Add the metadata again just before the </application> close 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" />
and in your dimens.xml:
<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>
P

About the author







Sign In
Create Account













10 Comments
Rocky7
Oct 16 2012 04:13 PM
nmesisca
Oct 16 2012 09:43 PM
PaulOBrien
Oct 17 2012 06:01 AM
P
smartgpc
Nov 01 2012 05:06 PM
AshtonBRSC
Nov 19 2012 11:48 PM
jmbneaf
Dec 03 2012 04:35 AM
Minor note for Eclipse users . . . .
Need to change from:
<uses-library required="false" name="com.sec.android.app.multiwindow"> </uses-library>
To this:
<uses-library android:required="false" android:name="com.sec.android.app.multiwindow"> </uses-library>
phunni
Dec 21 2012 02:45 PM
jcddcjjcd
Dec 24 2012 01:34 AM
phunni
Dec 31 2012 12:46 PM
hjernemadsen
Jan 03 2013 10:37 AM
I've added MultiWindows support to my application, by following the instructions here:
http://developer.sam...chnical-docs-09
However that tutorial doesn't mention the need for the library, and on my Galaxy S3 it seems to work without it. Does anyone know if the library is necessary for it to work on other devices/versions?
Also it seems that if the DEFAULT/MINIMUM settings are left out, the default is to make the app fill half the screen when dragged in, and have a minimum size that corresponds to the height of the actionbar.