Sprache

ExecuteAppFunctionRequest.Builder.SetActivityId(AppFunctionActivityId) Method

Definition

Sets the AppFunctionActivityId.

[Android.Runtime.Register("setActivityId", "(Landroid/app/appfunctions/AppFunctionActivityId;)Landroid/app/appfunctions/ExecuteAppFunctionRequest$Builder;", "", ApiSince=37)]
public Android.App.AppFunctions.ExecuteAppFunctionRequest.Builder SetActivityId(Android.App.AppFunctions.AppFunctionActivityId? activityId);
[<Android.Runtime.Register("setActivityId", "(Landroid/app/appfunctions/AppFunctionActivityId;)Landroid/app/appfunctions/ExecuteAppFunctionRequest$Builder;", "", ApiSince=37)>]
member this.SetActivityId : Android.App.AppFunctions.AppFunctionActivityId -> Android.App.AppFunctions.ExecuteAppFunctionRequest.Builder

Parameters

activityId
AppFunctionActivityId

The activity identifier to associate with this request. This value may be null.

Returns

Attributes

Remarks

Sets the AppFunctionActivityId.

If the target app function's AppFunctionMetadata.getScope is AppFunctionMetadata.SCOPE_ACTIVITY, this must be set to disambiguate between instances of the same app function running in different activities.

The value must be unset or null if the target app function is not AppFunctionMetadata.SCOPE_ACTIVITY.

The list of valid activity identifiers for a given function name can be obtained by calling AppFunctionManager.getAppFunctionStates. The returned AppFunctionState objects will contain the associated activity IDs via AppFunctionState.getActivityIds().

The list of functions provided by an activity can be obtained by calling AppFunctionManager.getAppFunctionActivityStates.

Android reference for android.app.appfunctions.ExecuteAppFunctionRequest.Builder.setActivityId.

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.

Applies to