supportShouldUpRecreateTask

open fun supportShouldUpRecreateTask(@NonNull targetIntent: @NonNull Intent): Boolean(source)

Returns true if sourceActivity should recreate the task when navigating 'up' by using targetIntent.

If this method returns false the app can trivially call supportNavigateUpTo using the same parameters to correctly perform up navigation. If this method returns false, the app should synthesize a new task stack by using androidx.core.app.TaskStackBuilder or another similar mechanism to perform up navigation.

Return

true if navigating up should recreate a new task stack, false if the same task should be used for the destination

Parameters

targetIntent

An intent representing the target destination for up navigation