ActivityOptions.SetMovableTaskRequired(Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets whether a task in which the activity will be launched is required to be movable right
after launch using the ActivityManager.AppTask#moveTaskTo(TaskLocation,
java.util.concurrent.Executor, android.os.OutcomeReceiver) method.
[Android.Runtime.Register("setMovableTaskRequired", "(Z)Landroid/app/ActivityOptions;", "GetSetMovableTaskRequired_ZHandler", ApiSince=37)]
[Android.Runtime.RequiresPermission("android.permission.REPOSITION_SELF_WINDOWS")]
public virtual Android.App.ActivityOptions SetMovableTaskRequired(bool movableTaskRequired);
[<Android.Runtime.Register("setMovableTaskRequired", "(Z)Landroid/app/ActivityOptions;", "GetSetMovableTaskRequired_ZHandler", ApiSince=37)>]
[<Android.Runtime.RequiresPermission("android.permission.REPOSITION_SELF_WINDOWS")>]
abstract member SetMovableTaskRequired : bool -> Android.App.ActivityOptions
override this.SetMovableTaskRequired : bool -> Android.App.ActivityOptions
Parameters
- movableTaskRequired
- Boolean
Returns
- Attributes
Remarks
Sets whether a task in which the activity will be launched is required to be movable right after launch using the ActivityManager.AppTask.moveTaskTo(TaskLocation,java.util.concurrent.Executor,android.os.OutcomeReceiver) method. If the system cannot guarantee this, the Context.startActivity call will throw an InfeasibleActivityOptionsException.
Defaults to false, if not set.
This option will cause the Context.startActivity call to throw an InfeasibleActivityOptionsException if the activity is not launched in a new task. For more information about how the host task of a new activity is determined, see the guide on task management. Requires Manifest.permission.REPOSITION_SELF_WINDOWS
Android reference for android.app.ActivityOptions.setMovableTaskRequired.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.