package com.msupplymobile;

import android.app.Application;

import android.app.Application;
import android.content.Context;
import com.facebook.react.PackageList;
import com.facebook.react.ReactApplication;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.soloader.SoLoader;
import java.lang.reflect.InvocationTargetException;
import java.util.List;

import com.facebook.react.ReactApplication;
import com.bugsnag.BugsnagReactNative;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;

import java.util.Arrays;

public class MainApplication extends Application implements ReactApplication {

  private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
    @Override
    public boolean getUseDeveloperSupport() {
      return BuildConfig.DEBUG;
    }

    @Override
    protected List<ReactPackage> getPackages() {
      
      List<ReactPackage> packages = new PackageList(this).getPackages();
      return packages;
    }
  
    @Override
    protected String getJSMainModuleName() {
      return "index";
    }
  };

  @Override
  public ReactNativeHost getReactNativeHost() {
    return mReactNativeHost;
  }

  @Override
  public void onCreate() {
    super.onCreate();
    SoLoader.init(this, false);

    // Disabling Flipper until a point of higher understanding
    // initializeFlipper(this);
  }

    /**
   * Loads Flipper in React Native templates.
   *
   * @param context
   */
  private static void initializeFlipper(Context context) {
    if (BuildConfig.DEBUG) {
      try {
        /*
         We use reflection here to pick up the class that initializes Flipper,
        since Flipper library is not available in release mode
        */
        Class<?> aClass = Class.forName("com.facebook.flipper.ReactNativeFlipper");
        aClass.getMethod("initializeFlipper", Context.class).invoke(null, context);
      } catch (ClassNotFoundException e) {
        e.printStackTrace();
      } catch (NoSuchMethodException e) {
        e.printStackTrace();
      } catch (IllegalAccessException e) {
        e.printStackTrace();
      } catch (InvocationTargetException e) {
        e.printStackTrace();
      }
    }
  }
}

@@ -58,40 +58,8 @@
 n;%0A%0A
-import android.app.Application;%0A
 impo
@@ -121,24 +121,74 @@
 ackageList;%0A
+import com.facebook.react.shell.MainReactPackage;%0A
 import com.f
@@ -421,290 +421,8 @@
 t;%0A%0A
-import com.facebook.react.ReactApplication;%0Aimport com.bugsnag.BugsnagReactNative;%0Aimport com.facebook.react.ReactNativeHost;%0Aimport com.facebook.react.ReactPackage;%0Aimport com.facebook.react.shell.MainReactPackage;%0Aimport com.facebook.soloader.SoLoader;%0A%0Aimport java.util.Arrays;%0A%0A
 publ

Add removal of extraneous dependencies