List of usage examples for com.facebook.react.shell MainReactPackage MainReactPackage
public MainReactPackage()
From source file:com.cilstoredemo.CILReactActivity.java
License:Open Source License
/** * Called at construction time, override if you have a custom delegate implementation. * * ?bundleName//from ww w. j a v a 2 s. c o m */ protected CILReactActivityDelegate createReactActivityDelegate() { CILReactActivityDelegate reactActivityDelegate = new CILReactActivityDelegate(this, getMainComponentName()); reactActivityDelegate.setReactNativeHost(new ReactNativeHost(MainApplication.getApplication()) { @Override public boolean getUseDeveloperSupport() { // NOTE: bundleTrue??False return !BuildConfig.DEBUG; } @Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList(new MainReactPackage() // NOTE: Package ); } @Override protected String getJSMainModuleName() { return bundleName; } @Nullable @Override protected String getBundleAssetName() { return bundleName + ".bundle"; } }); return reactActivityDelegate; }
From source file:com.facebook.f8.MainActivity.java
License:Open Source License
/** * A list of packages used by the app. If the app uses additional views * or modules besides the default ones, add more packages here. *//*from w w w.j a v a 2s . com*/ @Override protected List<ReactPackage> getPackages() { this._pushNotification = new ReactNativePushNotificationPackage(this); mCallbackManager = new CallbackManager.Factory().create(); return Arrays.<ReactPackage>asList(new MainReactPackage(), new FBSDKPackage(mCallbackManager), new LinearGradientPackage(), new RNSharePackage(), new RNSendIntentPackage(), new CodePush("qwfkzzq7Y8cSrkiuU7aRCkIP7XYLEJ6b-AFoe", this, BuildConfig.DEBUG), this._pushNotification); }
From source file:com.lighters.demos.reactnative.ToastRnActivity.java
License:Apache License
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mReactRootView = new ReactRootView(this); mReactInstanceManager = ReactInstanceManager.builder().setApplication(getApplication()) .setBundleAssetName("index.android.bundle").setJSMainModuleName("index.android") .addPackage(new MainReactPackage()).addPackage(new ToastExampleReactPackage()) .setUseDeveloperSupport(BuildConfig.DEBUG) //.setUseDeveloperSupport(false) .setInitialLifecycleState(LifecycleState.RESUMED) //.setUseOldBridge(true) // uncomment this line if your app crashes .build();//ww w. jav a 2 s. co m mReactRootView.startReactApplication(mReactInstanceManager, "HelloWorld", null); setContentView(mReactRootView); }
From source file:com.microsoft.c3p.test.reactnative.MainActivity.java
License:Open Source License
/** * A list of packages used by the app. If the app uses additional views * or modules besides the default ones, add more packages here. *///w w w .j a va 2s. c om @Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList(new MainReactPackage(), new com.microsoft.c3p.reactnative.C3PReactPackage()); }
From source file:com.publicradionative.MainActivity.java
License:Apache License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mReactRootView = new ReactRootView(this); mReactInstanceManager = ReactInstanceManager.builder().setApplication(getApplication()) .setBundleAssetName("index.android.bundle").setJSMainModuleName("index.android") .addPackage(new MainReactPackage()).addPackage(new VectorIconsPackage()) .addPackage(new ProjectModulesPackage(this)).setUseDeveloperSupport(BuildConfig.DEBUG) .setInitialLifecycleState(LifecycleState.RESUMED).build(); mReactRootView.startReactApplication(mReactInstanceManager, "PublicRadioNative", null); setContentView(mReactRootView);// w w w.ja v a 2s .com }
From source file:com.socialdisasters.other.MainActivity.java
License:Open Source License
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mReactRootView = new ReactRootView(this); mReactInstanceManager = ReactInstanceManager.builder().setApplication(getApplication()) .setBundleAssetName("index.android.bundle").setJSMainModuleName("index.android") .addPackage(new MainReactPackage()).setUseDeveloperSupport(BuildConfig.DEBUG) .setInitialLifecycleState(LifecycleState.RESUMED).build(); mReactRootView.startReactApplication(mReactInstanceManager, "HelloWorld", null); setContentView(mReactRootView);//from w w w .j a v a2 s . co m }
From source file:io.whereat.mobile.MainActivity.java
License:Open Source License
/** * A list of packages used by the app. If the app uses additional views * or modules besides the default ones, add more packages here. *///from w ww . j a v a2 s.c o m @Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList(new MainReactPackage(), new LOSTLocationPackage(), new OsmDroidMapViewPackage()); }