@Override protected ReactInstanceManager createReactInstanceManager() { ReactInstanceManagerBuilder builder = ReactInstanceManager.builder() .setApplication(getApplication()) .setJSMainModuleName(getJSMainModuleName()) .setUseDeveloperSupport(getUseDeveloperSupport()) .setRedBoxHandler(getRedBoxHandler()) .setUIImplementationProvider(getUIImplementationProvider()) .setInitialLifecycleState(LifecycleState.BEFORE_CREATE) .setNativeModuleCallExceptionHandler( new ReadingNativeModuleCallExceptionHandler()); for (ReactPackage reactPackage : getPackages()) { builder.addPackage(reactPackage); } String jsBundleFile = getJSBundleFile(); if (jsBundleFile != null) { builder.setJSBundleFile(jsBundleFile); } else { builder.setBundleAssetName(Assertions.assertNotNull(getBundleAssetName())); } return builder.build(); }
@Override protected List<ReactPackage> getPackages() { List<ReactPackage> result = new ArrayList<>(); List<ReactPackage> additionalReactPackages = NavigationApplication.instance.createAdditionalReactPackages(); if (additionalReactPackages != null) result.addAll(additionalReactPackages); if (!containsInstanceOfClass(result, MainReactPackage.class)) { result.add(new MainReactPackage()); } if (!containsInstanceOfClass(result, NavigationReactPackage.class)) { result.add(new NavigationReactPackage()); } return result; }
public static synchronized ReactInstanceManager getReactInstanceManager( Application application) { if (sSingletonManager == null) { ReactInstanceManager.Builder builder = ReactInstanceManager.builder() .setApplication(application) .setJSMainModuleName("index.android") .setUseDeveloperSupport(BuildConfig.DEBUG) // TODO figure out the right thing to put here. .setInitialLifecycleState(LifecycleState.BEFORE_RESUME); for (ReactPackage reactPackage : getPackages()) { builder.addPackage(reactPackage); } builder.setBundleAssetName("index.android.bundle"); sSingletonManager = builder.build(); } return sSingletonManager; }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new NearbyPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new CameraPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new ReactTwitterKitPackage(CONSUMER_KEY, CONSUMER_SECRET) ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new VectorIconsPackage(), new RNCollapsingToolbarPackage(), new RNNestedScrollViewPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new SystemSettingPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new RNMessageComposePackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new RNReactNativeAndoridShadowPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new RNGLModelViewPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new ReactNativeAndroidAudioConverterPackage() // <---- add this line ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new RNRecyclerviewListPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new TestPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.asList( new MainReactPackage(), new WearCommunicationReactPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new RNSettingsPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new RNTensorFlowPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new PLPAlertPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new MaterialCalendarViewPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new SyncAdapterPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new RNThreadPackage(mReactNativeHost) ); }
private void addNativeModules(ReactApplicationContext reactContext, NativeModuleRegistryBuilder nativeRegistryBuilder) { for (int i = 0; i < reactPackages.size(); i++) { ReactPackage reactPackage = reactPackages.get(i); for (NativeModule nativeModule : reactPackage.createNativeModules(reactContext)) { nativeRegistryBuilder.addNativeModule(nativeModule); } } }
public RNThreadModule(final ReactApplicationContext reactContext, ReactNativeHost reactNativehost, ReactPackage additionalThreadPackages[]) { super(reactContext); this.reactApplicationContext = reactContext; threads = new HashMap<>(); this.reactNativeHost = reactNativehost; this.additionalThreadPackages = additionalThreadPackages; reactContext.addLifecycleEventListener(this); }
@ReactMethod public void startThread(final String jsFileName, final Promise promise) { Log.d(TAG, "Starting web thread - " + jsFileName); String jsFileSlug = jsFileName.contains("/") ? jsFileName.replaceAll("/", "_") : jsFileName; JSBundleLoader bundleLoader = getDevSupportManager().getDevSupportEnabled() ? createDevBundleLoader(jsFileName, jsFileSlug) : createReleaseBundleLoader(jsFileName, jsFileSlug); try { ArrayList<ReactPackage> threadPackages = new ArrayList<ReactPackage>(Arrays.asList(additionalThreadPackages)); threadPackages.add(0, new ThreadBaseReactPackage(getReactInstanceManager())); ReactContextBuilder threadContextBuilder = new ReactContextBuilder(getReactApplicationContext()) .setJSBundleLoader(bundleLoader) .setDevSupportManager(getDevSupportManager()) .setReactInstanceManager(getReactInstanceManager()) .setReactPackages(threadPackages); JSThread thread = new JSThread(jsFileSlug); thread.runFromContext( getReactApplicationContext(), threadContextBuilder ); threads.put(thread.getThreadId(), thread); promise.resolve(thread.getThreadId()); } catch (Exception e) { promise.reject(e); getDevSupportManager().handleException(e); } }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new RNFetchBlobPackage(), new ImageResizerPackage(), new ImagePickerPackage() ); }
/** * A list of packages used by the app. If the app uses additional views * or modules besides the default ones, add more packages here. */ @Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new OrientationPackage(this) ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new GrowingRnPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new RCTTwilioChatPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new SQLitePluginPackage(), new RNDeviceInfo(), new OrientationPackage(MainActivity.getActivity()), new RNSpinkitPackage(), new RNCrashReporterModule(MainActivity.getActivity()) ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new CallLogPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new SunmiInnerPrinterPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new VectorIconsPackage(), new RNFSPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new RCTMPushPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new WaveViewPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new CheckoutMercadoPagoPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new RNDatecsPrinterPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new ImageCompressPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new TextGradientPackage() ); }
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new VectorIconsPackage(), new FastImageViewPackage() ); }