Java Code Examples for com.facebook.react.bridge.WebsocketJavaScriptExecutor

The following are top voted examples for showing how to use com.facebook.react.bridge.WebsocketJavaScriptExecutor. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: ReactNativeSignatureExample   File: DevSupportManagerImpl.java   View source code 6 votes vote down vote up
private WebsocketJavaScriptExecutor.JSExecutorConnectCallback getExecutorConnectCallback(
    final ProgressDialog progressDialog,
    final SimpleSettableFuture<Boolean> future) {
  return new WebsocketJavaScriptExecutor.JSExecutorConnectCallback() {
    @Override
    public void onSuccess() {
      future.set(true);
      progressDialog.dismiss();
    }

    @Override
    public void onFailure(final Throwable cause) {
      progressDialog.dismiss();
      FLog.e(ReactConstants.TAG, "Unable to connect to remote debugger", cause);
      future.setException(
          new IOException(
              mApplicationContext.getString(R.string.catalyst_remotedbg_error), cause));
    }
  };
}
 
Example 2
Project: react-native-ibeacon-android   File: DevSupportManagerImpl.java   View source code 6 votes vote down vote up
private WebsocketJavaScriptExecutor.JSExecutorConnectCallback getExecutorConnectCallback(
    final ProgressDialog progressDialog,
    final SimpleSettableFuture<Boolean> future) {
  return new WebsocketJavaScriptExecutor.JSExecutorConnectCallback() {
    @Override
    public void onSuccess() {
      future.set(true);
      progressDialog.dismiss();
    }

    @Override
    public void onFailure(final Throwable cause) {
      progressDialog.dismiss();
      FLog.e(ReactConstants.TAG, "Unable to connect to remote debugger", cause);
      future.setException(
          new IOException(
              mApplicationContext.getString(R.string.catalyst_remotedbg_error), cause));
    }
  };
}
 
Example 3
Project: react-native-box-loaders   File: DevSupportManagerImpl.java   View source code 6 votes vote down vote up
private WebsocketJavaScriptExecutor.JSExecutorConnectCallback getExecutorConnectCallback(
    final ProgressDialog progressDialog,
    final SimpleSettableFuture<Boolean> future) {
  return new WebsocketJavaScriptExecutor.JSExecutorConnectCallback() {
    @Override
    public void onSuccess() {
      future.set(true);
      progressDialog.dismiss();
    }

    @Override
    public void onFailure(final Throwable cause) {
      progressDialog.dismiss();
      FLog.e(ReactConstants.TAG, "Unable to connect to remote debugger", cause);
      future.setException(
          new IOException(
              mApplicationContext.getString(R.string.catalyst_remotedbg_error), cause));
    }
  };
}