1 // custom 2 package com.testrunner; 3 4 import android.content.Intent; 5 6 import expo.modules.devmenu.react.DevMenuAwareReactActivity; 7 import com.facebook.react.ReactActivityDelegate; 8 9 import expo.modules.ReactActivityDelegateWrapper; 10 import expo.modules.devlauncher.DevLauncherController; 11 12 public class MainActivity extends DevMenuAwareReactActivity { 13 /** 14 * Returns the name of the main component registered from JavaScript. 15 * This is used to schedule rendering of the component. 16 */ 17 @Override getMainComponentName()18 protected String getMainComponentName() { 19 return "main"; 20 } 21 22 @Override onNewIntent(Intent intent)23 public void onNewIntent(Intent intent) { 24 if (DevLauncherController.tryToHandleIntent(this, intent)) { 25 return; 26 } 27 super.onNewIntent(intent); 28 } 29 30 @Override createReactActivityDelegate()31 protected ReactActivityDelegate createReactActivityDelegate() { 32 return DevLauncherController.wrapReactActivityDelegate(this, () -> new ReactActivityDelegateWrapper( 33 this, 34 new ReactActivityDelegate( 35 this, 36 getMainComponentName() 37 ) 38 )); 39 } 40 } 41