IntentMonitor

interface IntentMonitor


Interface for tests to use when they need to monitor intents used to start activities from the current Instrumentation.

Retrieve instances of the monitor through an instance to be present under any arbitrary instrumentation.

Summary

Public methods

abstract @NonNull void

Adds an IntentCallback, which will be notified when intents are sent from the current instrumentation process.

abstract @NonNull void

Removes a previously registered IntentCallback.

Public methods

addIntentCallback

@NonNull
public abstract void addIntentCallback(@NonNull IntentCallback callback)

Adds an IntentCallback, which will be notified when intents are sent from the current instrumentation process.

removeIntentCallback

@NonNull
public abstract void removeIntentCallback(@NonNull IntentCallback callback)

Removes a previously registered IntentCallback.