MCPcopy Create free account
hub / github.com/KbamApp/kbam / MainApplication

Class MainApplication

android/app/src/main/java/com/kbam/MainApplication.java:13–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11import java.util.List;
12
13public class MainApplication extends Application implements ReactApplication {
14
15 private final ReactNativeHost mReactNativeHost =
16 new DefaultReactNativeHost(this) {
17 @Override
18 public boolean getUseDeveloperSupport() {
19 return BuildConfig.DEBUG;
20 }
21
22 @Override
23 protected List<ReactPackage> getPackages() {
24 @SuppressWarnings("UnnecessaryLocalVariable")
25 List<ReactPackage> packages = new PackageList(this).getPackages();
26 // Packages that cannot be autolinked yet can be added manually here, for example:
27 // packages.add(new MyReactNativePackage());
28 return packages;
29 }
30
31 @Override
32 protected String getJSMainModuleName() {
33 return "index";
34 }
35
36 @Override
37 protected boolean isNewArchEnabled() {
38 return BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
39 }
40
41 @Override
42 protected Boolean isHermesEnabled() {
43 return BuildConfig.IS_HERMES_ENABLED;
44 }
45 };
46
47 @Override
48 public ReactNativeHost getReactNativeHost() {
49 return mReactNativeHost;
50 }
51
52 @Override
53 public void onCreate() {
54 super.onCreate();
55 SoLoader.init(this, /* native exopackage */ false);
56 if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
57 // If you opted-in for the New Architecture, we load the native entry point for this app.
58 DefaultNewArchitectureEntryPoint.load();
59 }
60 ReactNativeFlipper.initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
61 }
62}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected