AppInteractionSession.UpdateParams.Builder
public
static
final
class
AppInteractionSession.UpdateParams.Builder
extends Object
| java.lang.Object | |
| ↳ | android.app.AppInteractionSession.UpdateParams.Builder |
Builder for UpdateParams.
Summary
Public constructors | |
|---|---|
Builder()
Constructor for |
|
Public methods | |
|---|---|
AppInteractionSession.UpdateParams
|
build()
Builds the |
AppInteractionSession.UpdateParams.Builder
|
setAdditionalTargetPackages(List<String> additionalTargetPackages)
Sets the additional target packages for which the session will be interacting with. |
AppInteractionSession.UpdateParams.Builder
|
setExtras(Bundle extras)
Sets the additional metadata for this update. |
AppInteractionSession.UpdateParams.Builder
|
setOnStartIntentSenderCallback(Executor executor, Consumer<IntentSender> callback)
Called when the session update needs to be approved by the user. |
Inherited methods | |
|---|---|
Public constructors
Public methods
build
public AppInteractionSession.UpdateParams build ()
Builds the UpdateParams.
| Returns | |
|---|---|
AppInteractionSession.UpdateParams |
This value cannot be null. |
setAdditionalTargetPackages
public AppInteractionSession.UpdateParams.Builder setAdditionalTargetPackages (List<String> additionalTargetPackages)
Sets the additional target packages for which the session will be interacting with.
| Parameters | |
|---|---|
additionalTargetPackages |
List: The list of additional target packages for which the
app interaction session will be interacting with.
This value cannot be null. |
| Returns | |
|---|---|
AppInteractionSession.UpdateParams.Builder |
This value cannot be null. |
setExtras
public AppInteractionSession.UpdateParams.Builder setExtras (Bundle extras)
Sets the additional metadata for this update.
| Parameters | |
|---|---|
extras |
Bundle: The additional metadata for this update.
This value cannot be null. |
| Returns | |
|---|---|
AppInteractionSession.UpdateParams.Builder |
This value cannot be null. |
setOnStartIntentSenderCallback
public AppInteractionSession.UpdateParams.Builder setOnStartIntentSenderCallback (Executor executor, Consumer<IntentSender> callback)
Called when the session update needs to be approved by the user.
This callback would be called when AppInteractionSession.update(UpdateParams,Executor,OutcomeReceiver) requires
confirmation from the user.
Applications should launch the UI for the user to allow the update of the session
by calling Context.startIntentSender(IntentSender,Intent,int,int,int).
| Parameters | |
|---|---|
executor |
Executor: the executor to run the callback on.
This value cannot be null.
Callback and listener events are dispatched through this Executor, providing an easy way to control which thread is
used. To dispatch events through the main thread of your
application, you can use
Context.getMainExecutor().
Otherwise, provide an Executor that dispatches to an appropriate thread. |
callback |
Consumer: the callback to be called when the session request needs to be
approved by the user.
This value cannot be null. |
| Returns | |
|---|---|
AppInteractionSession.UpdateParams.Builder |
This value cannot be null. |