1 package `fun`.upup.musicfree 2 import expo.modules.ReactActivityDelegateWrapper 3 4 import com.facebook.react.ReactActivity 5 import com.facebook.react.ReactActivityDelegate 6 import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled 7 import com.facebook.react.defaults.DefaultReactActivityDelegate 8 import android.os.Bundle 9 10 class MainActivity : ReactActivity() { 11 12 /** 13 * Returns the name of the main component registered from JavaScript. This is used to schedule 14 * rendering of the component. 15 */ 16 override fun getMainComponentName(): String = "MusicFree" 17 18 /** 19 * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] 20 * which allows you to enable New Architecture with a single boolean flags [fabricEnabled] 21 */ 22 override fun createReactActivityDelegate(): ReactActivityDelegate = 23 ReactActivityDelegateWrapper(this, BuildConfig.IS_NEW_ARCHITECTURE_ENABLED, DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled)) 24 25 // https://reactnavigation.org/docs/getting-started/#installing-dependencies-into-a-bare-react-native-project 26 override fun onCreate(savedInstanceState: Bundle?) { 27 super.onCreate(null); 28 } 29 } 30