Samsung Galaxy Note 2 Multi Window Support

Jaames

Active Member
Licensed User
Longtime User
Hi.

I tried to modify AndroidManifest.xml file to include my apk in Multi Window list on my Galaxy Note 2 but without luck.

Has anyone managed to do it?

Thanks
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Based on this link: android - Multi Window is not working - Stack Overflow

You should add the following code to the manifest editor:
B4X:
AddActivityText(main, <intent-filter>
<action android:name="android.intent.action.MAIN" />

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

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

AddApplicationText( <uses-library android:required="false" name="com.sec.android.app.multiwindow"> </uses-library>
    <meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
    <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" />)
 
Upvote 0

Jaames

Active Member
Licensed User
Longtime User
Based on this link: android - Multi Window is not working - Stack Overflow

You should add the following code to the manifest editor:
B4X:
AddActivityText(main, <intent-filter>
<action android:name="android.intent.action.MAIN" />

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

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

AddApplicationText( <uses-library android:required="false" name="com.sec.android.app.multiwindow"> </uses-library>
    <meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
    <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" />)

:) It is working. Thank you Erel you are such a great person :sign0060:
 
Upvote 0

Jaames

Active Member
Licensed User
Longtime User
There you go :)
 

Attachments

  • ss1.png
    ss1.png
    77.1 KB · Views: 532
  • ss2.jpg
    ss2.jpg
    30.4 KB · Views: 508
Upvote 0

maiconcwb

Member
Licensed User
Longtime User
So good! It works with my Galaxy S4 (I9505).

Another question: how to know when there is a screen resize? Is there an event? How to include the app into the side bar (where multi window apps are fixed)?

Thanks a lot! Great job!!
 
Upvote 0

MarFraWare

Member
Licensed User
Longtime User
MultiWindow: Resize Event

Same to me: Everything is working fine except: how to detect a Resize Event?


So good! It works with my Galaxy S4 (I9505).

Another question: how to know when there is a screen resize? Is there an event? How to include the app into the side bar (where multi window apps are fixed)?

Thanks a lot! Great job!!
 
Upvote 0

Turbo3

Active Member
Licensed User
Longtime User
I made only the manifest changes but don't have a Samsung to test. After the manifest change one user states that my app does not show up in the sidebar. Another user confirmed this but was able to get my app to be on screen with another. I am guessing he had my app on screen first and then added another from the sidebar. I have asked for details on how he did it.

Are there other changes I need besides the manifest change? Here is what manifest looks like:

B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.basic4ppc.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="4" />
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
AddActivityText(main, <intent-filter>
<action android:name="android.intent.action.MAIN" />

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

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

AddApplicationText( <uses-library android:required="false" name="com.sec.android.app.multiwindow"> </uses-library>
    <meta-data android:name="com.sec.android.support.multiwindow" android:value="true" />
    <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" />)

Here is what it looks like with my app on the right.
6mwm.png


===============
Update: I took a look at the generated manifest.xml and it has duplicates lines. Is this ok? Why does B4A duplicated two of the three lines?

B4X:
-<intent-filter>
               <action android:name="android.intent.action.MAIN"/>
               <category android:name="android.intent.category.LAUNCHER"/>
 </intent-filter>
-<intent-filter>
              <action android:name="android.intent.action.MAIN"/>
              <category android:name="android.intent.category.LAUNCHER"/>
              <category android:name="android.intent.category.MULTIWINDOW_LAUNCHER"/>
 </intent-filter>
 
Last edited:
Upvote 0

GuyBooth

Active Member
Licensed User
Longtime User
After the manifest change one user states that my app does not show up in the sidebar. Another user confirmed this but was able to get my app to be on screen with another. I am guessing he had my app on screen first and then added another from the sidebar. I have asked for details on how he did it.

Are there other changes I need besides the manifest change? Here is what manifest looks like:
Turbo3, I'm wondering if you ever found a solution to this? I am still unable to have my app show up in the sidebar, despite trying every combination of changes to the Manifest I can think of. I've read through the Samsung Tech Doc and made additional modifications, still with no success.
My "symptoms" are as you describe above.
I think multiwindow is going to be a more frequent requirement as time goes on - it would be good to have a solution.
 
Upvote 0

Turbo3

Active Member
Licensed User
Longtime User
What I posted above for the manifest is still what I am using. Don't have a Samsung to test with but have heard mixed results from users.

For some my app does not appear in the sidebar but if they start with my app on screen then they can add another from the sidebar.
 
Upvote 0
Top