mirror of
https://github.com/status-im/react-native.git
synced 2025-01-22 23:41:49 +00:00
0907ef6689
Summary: Fixes #10352. Closes https://github.com/facebook/react-native/pull/10724 Differential Revision: D4126371 fbshipit-source-id: e1765e2d2a3ff80a962f1db6bdc9e90d797d3ab6
43 lines
1.0 KiB
Java
43 lines
1.0 KiB
Java
package <%= package %>;
|
|
|
|
import android.app.Application;
|
|
import android.util.Log;
|
|
|
|
import com.facebook.react.ReactApplication;
|
|
import com.facebook.react.ReactInstanceManager;
|
|
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;
|
|
import java.util.List;
|
|
|
|
public class MainApplication extends Application implements ReactApplication {
|
|
|
|
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
|
|
@Override
|
|
protected boolean getUseDeveloperSupport() {
|
|
return BuildConfig.DEBUG;
|
|
}
|
|
|
|
@Override
|
|
protected List<ReactPackage> getPackages() {
|
|
return Arrays.<ReactPackage>asList(
|
|
new MainReactPackage()
|
|
);
|
|
}
|
|
};
|
|
|
|
@Override
|
|
public ReactNativeHost getReactNativeHost() {
|
|
return mReactNativeHost;
|
|
}
|
|
|
|
@Override
|
|
public void onCreate() {
|
|
super.onCreate();
|
|
SoLoader.init(this, /* native exopackage */ false);
|
|
}
|
|
}
|