AppInteractionManager


class AppInteractionManager
kotlin.Any
   ↳ android.app.AppInteractionManager

Provides access to App Interaction access control APIs.

Summary

Constants
static String

Activity action: Launches a UI that shows list of all interactors and provides management of App Interaction access of those interactors.

static String

Activity action: Launches a UI that shows a list of all targets that the specified interactor package can access, and provides management of App Interaction access of those targets.

static String

Activity action: Launches a UI that provides management of App Interaction access of a specific interactor to a specific target.

static String

Activity action: Launches a UI that shows list of all interactors for a specific target and provides management of App Interaction access by those interactors.

static String

Intent extra: A String specifying the package name of the interactor when requesting or managing App Interaction access.

static String

Intent extra: A String specifying the target package name when managing App Interaction access.

Public methods
Unit

Creates an app interaction session for the given params.

Constants

ACTION_MANAGE_APP_INTERACTION_ACCESS

static val ACTION_MANAGE_APP_INTERACTION_ACCESS: String

Activity action: Launches a UI that shows list of all interactors and provides management of App Interaction access of those interactors.

Input: Nothing.

Output: Nothing.

Value: "android.app.action.MANAGE_APP_INTERACTION_ACCESS"

ACTION_MANAGE_INTERACTOR_ACCESS

static val ACTION_MANAGE_INTERACTOR_ACCESS: String

Activity action: Launches a UI that shows a list of all targets that the specified interactor package can access, and provides management of App Interaction access of those targets.

Input: EXTRA_INTERACTOR_PACKAGE_NAME specifies the package whose access will be managed by the launched UI.

Output: Nothing.

Value: "android.app.action.MANAGE_INTERACTOR_ACCESS"

ACTION_MANAGE_INTERACTOR_TARGET_ACCESS

static val ACTION_MANAGE_INTERACTOR_TARGET_ACCESS: String

Activity action: Launches a UI that provides management of App Interaction access of a specific interactor to a specific target.

Input: EXTRA_INTERACTOR_PACKAGE_NAME specifies the interactor package name.

Input: EXTRA_TARGET_PACKAGE_NAME specifies the target package name.

Output: Nothing.

Value: "android.app.action.MANAGE_INTERACTOR_TARGET_ACCESS"

ACTION_MANAGE_TARGET_ACCESS

static val ACTION_MANAGE_TARGET_ACCESS: String

Activity action: Launches a UI that shows list of all interactors for a specific target and provides management of App Interaction access by those interactors.

Input: EXTRA_TARGET_PACKAGE_NAME specifies the package whose access will be managed by the launched UI.

Output: Nothing.

Value: "android.app.action.MANAGE_TARGET_ACCESS"

EXTRA_INTERACTOR_PACKAGE_NAME

static val EXTRA_INTERACTOR_PACKAGE_NAME: String

Intent extra: A String specifying the package name of the interactor when requesting or managing App Interaction access.

Value: "android.app.extra.INTERACTOR_PACKAGE_NAME"

EXTRA_TARGET_PACKAGE_NAME

static val EXTRA_TARGET_PACKAGE_NAME: String

Intent extra: A String specifying the target package name when managing App Interaction access.

Value: "android.app.extra.TARGET_PACKAGE_NAME"

Public methods

createSession

fun createSession(
    params: AppInteractionSession.CreateParams,
    executor: Executor,
    callback: OutcomeReceiver<AppInteractionSession!, AppInteractionException!>
): Unit

Creates an app interaction session for the given params.

Example usage:

<code>AppInteractionSession.CreateParams createSessionParams =
      new AppInteractionSession.CreateParams.Builder()
          .setOnStartIntentSenderCallback(
              executor,
              intentSender -&gt; {
                  // The callback will be invoked if the session creation requires user consent
                  try {
                      context.startIntentSender(intentSender, null, 0, 0, 0);
                  } catch (IntentSender.SendIntentException e) {
                      // Handle exception
                  }
              }
          )
          .setTargetPackages(Arrays.asList("com.example.target1"))
          .build();
 
  appInteractionManager.createSession(createSessionParams, executor, callback);
  </code>
Parameters
params AppInteractionSession.CreateParams: The params to create the session.
This value cannot be null.
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 OutcomeReceiver<AppInteractionSession!, AppInteractionException!>: The callback to be called when the session is created or an error occurs.
This value cannot be null.