xref: /MusicFree/android/app/src/main/java/fun/upup/musicfree/MainActivity.kt (revision 5589cdf32b2bb0f641e5ac7bf1f6152cd6b9b70e)
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 
9 class MainActivity : ReactActivity() {
10 
11   /**
12    * Returns the name of the main component registered from JavaScript. This is used to schedule
13    * rendering of the component.
14    */
15   override fun getMainComponentName(): String = "MusicFree"
16 
17   /**
18    * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate]
19    * which allows you to enable New Architecture with a single boolean flags [fabricEnabled]
20    */
21   override fun createReactActivityDelegate(): ReactActivityDelegate =
22       ReactActivityDelegateWrapper(this, BuildConfig.IS_NEW_ARCHITECTURE_ENABLED, DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled))
23 }
24