SHARE
TWEET

MainApplication.java

kiojiotisha Jul 17th, 2019 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.fgbmfimobile;
  2.  
  3. import android.app.Application;
  4.  
  5. import com.facebook.react.ReactApplication;
  6. import com.inprogress.reactnativeyoutube.ReactNativeYouTube;
  7. import com.BV.LinearGradient.LinearGradientPackage;
  8. import com.github.yamill.orientation.OrientationPackage;
  9. import com.corbt.keepawake.KCKeepAwakePackage;
  10. import com.imagepicker.ImagePickerPackage;
  11. import com.reactnativedocumentpicker.ReactNativeDocumentPicker;
  12. import com.geektime.rnonesignalandroid.ReactNativeOneSignalPackage;
  13. import com.lwansbrough.RCTCamera.RCTCameraPackage;
  14. import com.brentvatne.react.ReactVideoPackage;
  15. import com.airbnb.android.react.maps.MapsPackage;
  16. import com.testfairy.react.TestFairyPackage;
  17. import cl.json.RNSharePackage;
  18. import com.oblador.vectoricons.VectorIconsPackage;
  19. import com.RNFetchBlob.RNFetchBlobPackage;
  20. import com.facebook.react.ReactNativeHost;
  21. import com.facebook.react.ReactPackage;
  22. import com.facebook.react.shell.MainReactPackage;
  23. import com.facebook.soloader.SoLoader;
  24.  
  25. import com.facebook.CallbackManager;
  26. import com.facebook.FacebookSdk;
  27. import com.facebook.appevents.AppEventsLogger;
  28. import com.facebook.reactnative.androidsdk.FBSDKPackage;
  29.  
  30. import com.filepicker.FilePickerPackage;
  31.  
  32. import com.testfairy.react.TestFairyPackage;
  33.  
  34. import java.util.Arrays;
  35. import java.util.List;
  36.  
  37. public class MainApplication extends Application implements ReactApplication {
  38.  
  39.   private static CallbackManager mCallbackManager = CallbackManager.Factory.create();
  40.  
  41.   protected static CallbackManager getCallbackManager() {
  42.     return mCallbackManager;
  43.   }
  44.  
  45.   private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
  46.     @Override
  47.     public boolean getUseDeveloperSupport() {
  48.       return BuildConfig.DEBUG;
  49.     }
  50.  
  51.     @Override
  52.     protected List<ReactPackage> getPackages() {
  53.       return Arrays.<ReactPackage>asList(
  54.             new MapsPackage(),
  55.             new MainReactPackage(),
  56.             new ReactNativeYouTube(),
  57.             new LinearGradientPackage(),
  58.             new OrientationPackage(),
  59.             new KCKeepAwakePackage(),
  60.             new ImagePickerPackage(),
  61.             new ReactNativeDocumentPicker(),
  62.             new FBSDKPackage(mCallbackManager),
  63.             new ReactNativeOneSignalPackage(),
  64.             new RCTCameraPackage(),
  65.             new ReactVideoPackage(),
  66.             new TestFairyPackage(),
  67.             new RNSharePackage(),
  68.             new VectorIconsPackage(),
  69.             new RNFetchBlobPackage(),
  70.             new FilePickerPackage()
  71.       );
  72.     }
  73.  
  74.     @Override
  75.     protected String getJSMainModuleName() {
  76.       return "index";
  77.     }
  78.   };
  79.  
  80.   @Override
  81.   public ReactNativeHost getReactNativeHost() {
  82.     return mReactNativeHost;
  83.   }
  84.  
  85.   @Override
  86.   public void onCreate() {
  87.     super.onCreate();
  88.     SoLoader.init(this, /* native exopackage */ false);
  89.     FacebookSdk.sdkInitialize(getApplicationContext());
  90.     AppEventsLogger.activateApp(this);
  91.   }
  92. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top