com.facebook.hermes.reactexecutor.HermesExecutorFactory Java Examples

The following examples show how to use com.facebook.hermes.reactexecutor.HermesExecutorFactory. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ReactContextBuilder.java    From react-native-threads with MIT License 5 votes vote down vote up
private JavaScriptExecutorFactory getJSExecutorFactory() {
    try {
        String appName = Uri.encode(parentContext.getPackageName());
        String deviceName = Uri.encode(getFriendlyDeviceName());
        // If JSC is included, use it as normal
        SoLoader.loadLibrary("jscexecutor");
        return new JSCExecutorFactory(appName, deviceName);
    } catch (UnsatisfiedLinkError jscE) {
        // Otherwise use Hermes
        return new HermesExecutorFactory();
    }
}