When I plug my phone into the DeX dock, my app window is minimized in the DeX taskbar. This is default behaviour.
I am using a Galaxy S8 running DeX 2.5.
I want my app to display (full-screen or windowed) immediately when plugged into the DeX.
What I have tried so far (as per advice on the Samsung DeX website)...
1 - I have applied the manifest meta-data
that keeps the app process alive:
<meta-data
android:name="com.samsung.android.keepalive.density"
android:value="true"/>
2 - I have applied the configChanges
property to intercept config changes:
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|uiMode|keyboard|keyboardHidden|navigation"
This works as expected when the device is rotated, or when the screen is resized within the DeX interface i.e. Activity.onConfigurationChanged(Configuration)
runs.
But this does not get triggered by plugging the phone into the DeX.
3 - My activity has been set to resize in the manifest:
android:resizeableActivity="true"
android:supportsPictureInPicture="true"
- Is there a way to get the window to automatically display when plugged into the Dex?
- Is there a way to get a callback when plugged into the DeX, and then launch my app from that calllback?