DefaultReactActivityDelegate

open class DefaultReactActivityDelegate(activity: ReactActivity, mainComponentName: String, fabricEnabled: Boolean = false) : ReactActivityDelegate

A utility class that allows you to simplify the setup of a ReactActivityDelegate for new apps in Open Source.

Specifically, with this class you can simply control if Fabric is enabled for an Activity using the boolean flag in the constructor.

Parameters

fabricEnabled

Whether Fabric should be enabled for the RootView of this Activity.

Constructors

Link copied to clipboard
constructor(activity: ReactActivity, mainComponentName: String, fabricEnabled: Boolean, concurrentReactEnabled: Boolean)
constructor(activity: ReactActivity, mainComponentName: String, fabricEnabled: Boolean = false)

Functions

Link copied to clipboard

Get the current ReactContext from ReactHost or ReactInstanceManager

Link copied to clipboard
Link copied to clipboard

Get the ReactHost used by this app with Bridgeless enabled. By default, assumes getApplication is an instance of ReactApplication and calls getReactHost. Override this method if your application class does not implement ReactApplication or you simply have a different mechanism for storing a ReactHost, e.g. as a static field somewhere.

Link copied to clipboard
open fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun onCreate(savedInstanceState: Bundle)
Link copied to clipboard
open fun onDestroy()
Link copied to clipboard
open fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean
Link copied to clipboard
open fun onKeyLongPress(keyCode: Int, event: KeyEvent): Boolean
Link copied to clipboard
open fun onKeyUp(keyCode: Int, event: KeyEvent): Boolean
Link copied to clipboard
open fun onNewIntent(intent: Intent): Boolean
Link copied to clipboard
open fun onPause()
Link copied to clipboard
open fun onRequestPermissionsResult(requestCode: Int, permissions: Array<String>, grantResults: IntArray)
Link copied to clipboard
open fun onResume()
Link copied to clipboard
open fun onUserLeaveHint()
Link copied to clipboard
open fun onWindowFocusChanged(hasFocus: Boolean)
Link copied to clipboard
open fun requestPermissions(permissions: Array<String>, requestCode: Int, listener: PermissionListener)
Link copied to clipboard
open fun setReactRootView(reactRootView: ReactRootView)
Link copied to clipboard
open fun setReactSurface(reactSurface: ReactSurface)