Java Code Examples for com.facebook.react.bridge.JavaScriptExecutor.Factory

The following are Jave code examples for showing how to use Factory of the com.facebook.react.bridge.JavaScriptExecutor class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: ReactNativeSignatureExample   File: ReactInstanceManagerImpl.java   Source Code and License Vote up 6 votes
private void recreateReactContextInBackground(
    JavaScriptExecutor.Factory jsExecutorFactory,
    JSBundleLoader jsBundleLoader) {
  UiThreadUtil.assertOnUiThread();

  ReactContextInitParams initParams =
      new ReactContextInitParams(jsExecutorFactory, jsBundleLoader);
  if (mReactContextInitAsyncTask == null) {
    // No background task to create react context is currently running, create and execute one.
    mReactContextInitAsyncTask = new ReactContextInitAsyncTask();
    mReactContextInitAsyncTask.execute(initParams);
  } else {
    // Background task is currently running, queue up most recent init params to recreate context
    // once task completes.
    mPendingReactContextInitParams = initParams;
  }
}
 
Example 2
Project: react-native-ibeacon-android   File: ReactInstanceManagerImpl.java   Source Code and License Vote up 6 votes
private void recreateReactContextInBackground(
    JavaScriptExecutor.Factory jsExecutorFactory,
    JSBundleLoader jsBundleLoader) {
  UiThreadUtil.assertOnUiThread();

  ReactContextInitParams initParams =
      new ReactContextInitParams(jsExecutorFactory, jsBundleLoader);
  if (mReactContextInitAsyncTask == null) {
    // No background task to create react context is currently running, create and execute one.
    mReactContextInitAsyncTask = new ReactContextInitAsyncTask();
    mReactContextInitAsyncTask.execute(initParams);
  } else {
    // Background task is currently running, queue up most recent init params to recreate context
    // once task completes.
    mPendingReactContextInitParams = initParams;
  }
}
 
Example 3
Project: react-native-box-loaders   File: ReactInstanceManagerImpl.java   Source Code and License Vote up 6 votes
private void recreateReactContextInBackground(
    JavaScriptExecutor.Factory jsExecutorFactory,
    JSBundleLoader jsBundleLoader) {
  UiThreadUtil.assertOnUiThread();

  ReactContextInitParams initParams =
      new ReactContextInitParams(jsExecutorFactory, jsBundleLoader);
  if (mReactContextInitAsyncTask == null) {
    // No background task to create react context is currently running, create and execute one.
    mReactContextInitAsyncTask = new ReactContextInitAsyncTask();
    mReactContextInitAsyncTask.execute(initParams);
  } else {
    // Background task is currently running, queue up most recent init params to recreate context
    // once task completes.
    mPendingReactContextInitParams = initParams;
  }
}
 
Example 4
Project: ReactNativeSignatureExample   File: ReactInstanceManagerImpl.java   Source Code and License Vote up 4 votes
public ReactContextInitParams(
    JavaScriptExecutor.Factory jsExecutorFactory,
    JSBundleLoader jsBundleLoader) {
  mJsExecutorFactory = Assertions.assertNotNull(jsExecutorFactory);
  mJsBundleLoader = Assertions.assertNotNull(jsBundleLoader);
}
 
Example 5
Project: ReactNativeSignatureExample   File: ReactInstanceManagerImpl.java   Source Code and License Vote up 4 votes
public JavaScriptExecutor.Factory getJsExecutorFactory() {
  return mJsExecutorFactory;
}
 
Example 6
Project: react-native-ibeacon-android   File: ReactInstanceManagerImpl.java   Source Code and License Vote up 4 votes
public ReactContextInitParams(
    JavaScriptExecutor.Factory jsExecutorFactory,
    JSBundleLoader jsBundleLoader) {
  mJsExecutorFactory = Assertions.assertNotNull(jsExecutorFactory);
  mJsBundleLoader = Assertions.assertNotNull(jsBundleLoader);
}
 
Example 7
Project: react-native-ibeacon-android   File: ReactInstanceManagerImpl.java   Source Code and License Vote up 4 votes
public JavaScriptExecutor.Factory getJsExecutorFactory() {
  return mJsExecutorFactory;
}
 
Example 8
Project: react-native-box-loaders   File: ReactInstanceManagerImpl.java   Source Code and License Vote up 4 votes
public ReactContextInitParams(
    JavaScriptExecutor.Factory jsExecutorFactory,
    JSBundleLoader jsBundleLoader) {
  mJsExecutorFactory = Assertions.assertNotNull(jsExecutorFactory);
  mJsBundleLoader = Assertions.assertNotNull(jsBundleLoader);
}
 
Example 9
Project: react-native-box-loaders   File: ReactInstanceManagerImpl.java   Source Code and License Vote up 4 votes
public JavaScriptExecutor.Factory getJsExecutorFactory() {
  return mJsExecutorFactory;
}