コード例 #1
0
 @Override
 public CatalystInstance build() {
   return new CatalystInstanceImpl.Builder()
       .setReactQueueConfigurationSpec(ReactQueueConfigurationSpec.createDefault())
       .setJSExecutor(new JSCJavaScriptExecutor(new WritableNativeMap()))
       .setRegistry(mNativeModuleRegistryBuilder.build())
       .setJSModulesConfig(mJSModulesConfigBuilder.build())
       .setJSBundleLoader(
           JSBundleLoader.createFileLoader(mContext, "assets://AndroidTestBundle.js"))
       .setNativeModuleCallExceptionHandler(
           new NativeModuleCallExceptionHandler() {
             @Override
             public void handleException(Exception e) {
               throw new RuntimeException(e);
             }
           })
       .build();
 }
コード例 #2
0
 private void recreateReactContextInBackgroundFromBundleFile() {
   recreateReactContextInBackground(
       new JSCJavaScriptExecutor.Factory(),
       JSBundleLoader.createFileLoader(mApplicationContext, mJSBundleFile));
 }