2017-01-16 20:53:55 -06:00
|
|
|
package com.aretherecookies;
|
|
|
|
|
|
|
|
|
|
import android.app.Application;
|
2019-09-21 15:45:07 +00:00
|
|
|
import android.util.Log;
|
2017-01-16 20:53:55 -06:00
|
|
|
|
2019-09-21 15:45:07 +00:00
|
|
|
import com.facebook.react.PackageList;
|
|
|
|
|
import com.facebook.hermes.reactexecutor.HermesExecutorFactory;
|
|
|
|
|
import com.facebook.react.bridge.JavaScriptExecutorFactory;
|
2017-01-16 20:53:55 -06:00
|
|
|
import com.facebook.react.ReactApplication;
|
|
|
|
|
import com.facebook.react.ReactNativeHost;
|
|
|
|
|
import com.facebook.react.ReactPackage;
|
|
|
|
|
import com.facebook.soloader.SoLoader;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
public class MainApplication extends Application implements ReactApplication {
|
|
|
|
|
|
|
|
|
|
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
|
|
|
|
|
@Override
|
2017-05-28 10:49:46 -05:00
|
|
|
public boolean getUseDeveloperSupport() {
|
2017-01-16 20:53:55 -06:00
|
|
|
return BuildConfig.DEBUG;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected List<ReactPackage> getPackages() {
|
2019-09-21 15:45:07 +00:00
|
|
|
@SuppressWarnings("UnnecessaryLocalVariable")
|
|
|
|
|
List<ReactPackage> packages = new PackageList(this).getPackages();
|
|
|
|
|
// Packages that cannot be autolinked yet can be added manually here, for example:
|
|
|
|
|
// packages.add(new MyReactNativePackage());
|
|
|
|
|
return packages;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
protected String getJSMainModuleName() {
|
|
|
|
|
return "index";
|
2017-01-16 20:53:55 -06:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ReactNativeHost getReactNativeHost() {
|
|
|
|
|
return mReactNativeHost;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onCreate() {
|
|
|
|
|
super.onCreate();
|
|
|
|
|
SoLoader.init(this, /* native exopackage */ false);
|
|
|
|
|
}
|
|
|
|
|
}
|