Jump to content

Multi Window feature of Samsung Galaxy devices


haddy

Recommended Posts

Hi,

I hope by next major Poweramp version, that Poweramp would have official support for the promising "Multi Window" feature found on Android 4.1.2 and higher of Samsung TouchWiz Galaxy devices (S3, Note 2, Galaxy tab).

Official support for Poweramp is needed but currently it looks like a modder over at XDA forums has managed to get it working with what looks like using the Poweramp widget template, see here: http://forum.xda-dev...34&postcount=17

Samsung expects many Android app developers to take advantage of their Multi-Window function by adding support.

yKI6ODV.jpg

1iKF3Fb.jpg

WB85GLQ.jpg

samsung-multiwindow-cascadeview-Galaxy-tablet

kwXSTTj.jpg

Link to comment
Share on other sites

I added this as experimental feature - obviously it requires a bit more work than just adding the Samsung-proposed attributes to manifest.xml. Poweramp main ui is OpenGL based, and it doesn't seem to resize that OpenGL surface properly, but it works)

Thanks!

post-1749-0-80108700-1359888494_thumb.pn

Link to comment
Share on other sites

Ok,

I will paste the below guide for other developers willing to try add it to their apps:

-------------------------------------------------------------------------------------------------------

Developers: Add support for Samsung Multi Window to your apps - Android - News + Articles - MoDaCo

Published by: Paul O'Brien | Oct 16 2012 01:30 PM

http://www.modaco.co...-your-apps-r823

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...

• 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 name="app_defaultsize_h">598.0dip>
<dimen name="app_minimumsize_w">632.0dip>
<dimen name="app_minimumsize_h">598.0dip>

And that's it! Simple eh? Note that you will need to reboot your device for a newly added Multi Window app to appear in the bar.

gyTcyvq.png

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>

• If there is an issue when moving the split-screen Divider of the Multi Window (it might always jump straight to the top or bottom of the screen and can't be moved) then you must try this below fix:

Remove these two entries for the 'split-screen divider' fix:


[color=#000088]<meta-data[/color] [color=#660066]android:name[/color][color=#666600]=[/color][color=#008800]"com.sec.android.multiwindow.MINIMUM_SIZE_W"[/color] [color=#660066]android:resource[/color][color=#666600]=[/color][color=#008800]"@dimen/app_minimumsize_w"[/color] [color=#000088]/>[/color]
[color=#000088]<meta-data[/color] [color=#660066]android:name[/color][color=#666600]=[/color][color=#008800]"com.sec.android.multiwindow.MINIMUM_SIZE_H"[/color] [color=#660066]android:resource[/color][color=#666600]=[/color][color=#008800]"@dimen/app_minimumsize_h"[/color] [color=#000088]/>[/color]

and all is well. I took apart the Gallery app from v4.1.2 and that is all they had. I later tried using all 4 dimensions but via the value attribute and that worked also.


<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_W" android:value="632.0dip" />
<meta-data android:name="com.sec.android.multiwindow.DEFAULT_SIZE_H" android:value="598.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_W" android:value="632.0dip" />
<meta-data android:name="com.sec.android.multiwindow.MINIMUM_SIZE_H" android:value="598.0dip" />

-------------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------------

Technical docs : Tutorial-09 | SAMSUNG Developers

3-8. Multi Window for S Pen

http://developer.sam...chnical-docs-09

-------------------------------------------------------------------------------------------------------

Link to comment
Share on other sites

Max,

I have taken some screenshots of Poweramp-2.0.8-build-520 beta running on my Galaxy S III multi window.

Yes you are correct about the Open GL resize issues (occasional album art displacement) but what you must do is add a minimum height for the Multi Window (see guide in previous post on this topic).

These are my screenshots, please investigate minimum height issue:

(click each to enlarge)

15917647_screenshot_2013-02-09-18-12-47.png 15917648_screenshot_2013-02-09-18-08-36.png 15917649_screenshot_2013-02-09-18-07-58.png 15917651_screenshot_2013-02-09-18-06-51.png 15917652_screenshot_2013-02-09-18-06-44.png 15917653_screenshot_2013-02-09-18-06-38.png 15917654_screenshot_2013-02-09-18-06-23.png

Link to comment
Share on other sites

In our latest builds (as you tested) I added the multiwindow min/max parameters, they seem to be read by Samsung. Those with dip on the end results in exception (app still work but log is flooded by ROM complaining). This is experimental feature and we'll continue to improve it.

Thanks!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...