App continuity

Android Developer site - App continuity

App continuity refers to the capability of an app to seamlessly restore the user state when it receives a configuration change, such as when a device is folded or unfolded. Since an app running on a foldable device can transition from one screen to another, it is very important that the current task continues seamlessly after the transition and the app remains the same state and location.

When the system will trigger a configuration change during the transition, an app should save the UI state and support configuration changes gracefully.

Make your app resizable

Make your app resizable

To ensure your app works in multi-window mode with dynamic resizing, in the <application> or <activity> element, set the resizeableActivity attribute value to true. This enables maximum compatibility with all form factors and environments the app encounters, such as foldable, Samsung Dex mode, or other freeform windows.

If you set the resizeableActivity attribute value to true, the system assumes the app fully supports multi-window and is resizable.

If you set the resizeableActivity attribute value to false , this tells the platform it doesn't support multi-window and app continuity when folding and unfolding device. In this case, the user should restart the app to continue using it after folding or unfolding the device.

Note that Samsung added a small restart icon on the screen each time the activity's display area changes. Users can restart the activity in the new configuration even when the app is not resizable.

If you do not want your app to support multi-window mode but want to support app continuity, set the resizeableActivity attribute value to false and add the following meta data element within your element:

<meta-data
    android:name="android.supports_size_changes" android:value="true" />

If the android.supports_size_changes value is true and the user attempts to fold or unfold foldables, the activity modifies configurations to support foldable features, including changed window sizes.