Builder
class Builder
| kotlin.Any | |
| ↳ | android.app.AppInteractionSession.CreateParams.Builder |
Builder for CreateParams.
Summary
| Public constructors | |
|---|---|
Builder()Constructor for |
|
| Public methods | |
|---|---|
| AppInteractionSession.CreateParams |
build()Builds the |
| AppInteractionSession.CreateParams.Builder |
Sets the additional metadata for this session. |
| AppInteractionSession.CreateParams.Builder |
setOnStartIntentSenderCallback(executor: Executor, callback: Consumer<IntentSender!>)Called when the session creation needs to be approved by the user. |
| AppInteractionSession.CreateParams.Builder |
setTargetPackages(targetPackages: MutableList<String!>)Sets the target packages for which the app interaction session will be interacting with. |
Public constructors
Public methods
build
fun build(): AppInteractionSession.CreateParams
Builds the CreateParams.
| Return | |
|---|---|
AppInteractionSession.CreateParams |
This value cannot be null. |
setExtras
fun setExtras(extras: Bundle): AppInteractionSession.CreateParams.Builder
Sets the additional metadata for this session.
| Parameters | |
|---|---|
extras |
Bundle: The additional metadata for this session. This value cannot be null. |
| Return | |
|---|---|
AppInteractionSession.CreateParams.Builder |
This value cannot be null. |
setOnStartIntentSenderCallback
fun setOnStartIntentSenderCallback(
executor: Executor,
callback: Consumer<IntentSender!>
): AppInteractionSession.CreateParams.Builder
Called when the session creation needs to be approved by the user.
This callback would be called when AppInteractionManager.createSession(CreateParams,Executor,OutcomeReceiver) requires confirmation from the user.
Applications should launch the UI for the user to allow the creation 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<IntentSender!>: the callback to be called when the session request needs to be approved by the user. This value cannot be null. |
| Return | |
|---|---|
AppInteractionSession.CreateParams.Builder |
This value cannot be null. |
setTargetPackages
fun setTargetPackages(targetPackages: MutableList<String!>): AppInteractionSession.CreateParams.Builder
Sets the target packages for which the app interaction session will be interacting with.
| Parameters | |
|---|---|
targetPackages |
MutableList<String!>: The list of target packages for which the app interaction session will be interacting with. This value cannot be null. |
| Return | |
|---|---|
AppInteractionSession.CreateParams.Builder |
This value cannot be null. |