# OngoingStubbing

Summary:[Methods](https://developer.android.com/reference/android/support/test/espresso/intent/OngoingStubbing#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/test/espresso/intent/OngoingStubbing#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/test/espresso/intent/OngoingStubbing#)  

# OngoingStubbing

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public

final

class
OngoingStubbing
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object.html)`


``


`

|---|------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||
| ↳ | android.support.test.espresso.intent.OngoingStubbing |

<br />

*** ** * ** ***

Supports method chaining after @Intents#intending method call.

## Summary

|                                                                                                                                                                                                 ### Public methods                                                                                                                                                                                                 ||
|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void` | ` `[respondWith](https://developer.android.com/reference/android/support/test/espresso/intent/OngoingStubbing#respondWith(android.app.Instrumentation.ActivityResult))`(`[Instrumentation.ActivityResult](https://developer.android.com/reference/android/app/Instrumentation.ActivityResult.html)` result) ` Sets a response for the intent being stubbed.                                               |
| ` void` | ` `[respondWithFunction](https://developer.android.com/reference/android/support/test/espresso/intent/OngoingStubbing#respondWithFunction(android.support.test.espresso.intent.ActivityResultFunction))`(`[ActivityResultFunction](https://developer.android.com/reference/android/support/test/espresso/intent/ActivityResultFunction)` result) ` Sets a response callable for the intent being stubbed. |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/espresso/intent/OngoingStubbing#)From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object.html)` ` |-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object.html)          | ` clone() `                                                                                | | ` boolean`                                                                          | ` equals(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` void`                                                                             | ` finalize() `                                                                             | | ` final `[Class](https://developer.android.com/reference/java/lang/Class.html)`<?>` | ` getClass() `                                                                             | | ` int`                                                                              | ` hashCode() `                                                                             | | ` final void`                                                                       | ` notify() `                                                                               | | ` final void`                                                                       | ` notifyAll() `                                                                            | | ` `[String](https://developer.android.com/reference/java/lang/String.html)          | ` toString() `                                                                             | | ` final void`                                                                       | ` wait(long arg0, int arg1) `                                                              | | ` final void`                                                                       | ` wait(long arg0) `                                                                        | | ` final void`                                                                       | ` wait() `                                                                                 | ||

## Public methods

### respondWith

```
void respondWith (Instrumentation.ActivityResult result)
```

Sets a response for the intent being stubbed.

<br />

|                    Parameters                     ||
|----------|-----------------------------------------|
| `result` | `Instrumentation.ActivityResult` <br /> |

### respondWithFunction

```
void respondWithFunction (ActivityResultFunction result)
```

Sets a response callable for the intent being stubbed.

<br />

|                Parameters                 ||
|----------|---------------------------------|
| `result` | `ActivityResultFunction` <br /> |

-

  ## Interfaces

  - [ActivityResultFunction](https://developer.android.com/reference/android/support/test/espresso/intent/ActivityResultFunction)
  - [ResettingStubber](https://developer.android.com/reference/android/support/test/espresso/intent/ResettingStubber)
  - [ResolvedIntent](https://developer.android.com/reference/android/support/test/espresso/intent/ResolvedIntent)
  - [VerifiableIntent](https://developer.android.com/reference/android/support/test/espresso/intent/VerifiableIntent)
  - [VerificationMode](https://developer.android.com/reference/android/support/test/espresso/intent/VerificationMode)
-

  ## Classes

  - [Checks](https://developer.android.com/reference/android/support/test/espresso/intent/Checks)
  - [Intents](https://developer.android.com/reference/android/support/test/espresso/intent/Intents)
  - [OngoingStubbing](https://developer.android.com/reference/android/support/test/espresso/intent/OngoingStubbing)
  - [ResettingStubberImpl](https://developer.android.com/reference/android/support/test/espresso/intent/ResettingStubberImpl)
  - [VerificationModes](https://developer.android.com/reference/android/support/test/espresso/intent/VerificationModes)