Created
November 13, 2020 16:20
-
-
Save jaysoo/b905329327d2a97a11c42ddd498e255a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.awesomeproject; | |
import android.app.Application; | |
import android.content.Context; | |
import com.facebook.react.PackageList; | |
import com.facebook.react.ReactApplication; | |
import com.facebook.react.ReactInstanceManager; | |
import com.facebook.react.ReactNativeHost; | |
import com.facebook.react.ReactPackage; | |
import com.facebook.soloader.SoLoader; | |
import java.lang.reflect.InvocationTargetException; | |
import java.util.List; | |
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() { | |
@SuppressWarnings("UnnecessaryLocalVariable") | |
List<ReactPackage> packages = new PackageList(this).getPackages(); | |
return packages; | |
} | |
@Override | |
protected String getJSMainModuleName() { | |
return "apps/my-native-app/index"; | |
} | |
}; | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment