Summary: Ctors | Methods | Inherited Methods | [Expand All]

# JavaScriptBridge

`public final class JavaScriptBridge`
`extends Object` ``

java.lang.Object
↳ | android.support.test.espresso.web.bridge.JavaScriptBridge

Provides a gateway for Java and Javascript code to communicate to eachother.

## Summary

### Public constructors
`JavaScriptBridge()`

### Public methods
`static void` | `installBridge()` Sets up Java / Javascript bridging on every WebView in the app.
`static Conduit` | `makeConduit()` Creates a Conduit object which allows Java to wrap Javascript code within a handler that will foward evaluation results back to the Java process.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()`
`boolean` | `equals(Object arg0)`
`void` | `finalize()`
`final Class<?>` | `getClass()`
`int` | `hashCode()`
`final void` | `notify()`
`final void` | `notifyAll()`
`String` | `toString()`
`final void` | `wait(long arg0, int arg1)`
`final void` | `wait(long arg0)`
`final void` | `wait()`

## Public constructors

### JavaScriptBridge

    JavaScriptBridge ()

## Public methods

### installBridge

    void installBridge ()

Sets up Java / Javascript bridging on every WebView in the app.

This method must be called very early (eg: before webviews are loaded in your app). GoogleInstrumentation invokes this method if this library is present on your classpath.

This method must be called from the main thread. It'll return immedately if the bridge is already installed.

### makeConduit

    Conduit makeConduit ()

Creates a Conduit object which allows Java to wrap Javascript code within a handler that will foward evaluation results back to the Java process.

Conduits can be used for only 1 evaluation. Creating new ones is relatively cheap.

Returns
`Conduit` |

- ## Classes

  - Conduit
  - JavaScriptBridge