DeviceEventManagerModule

open class DeviceEventManagerModule(reactContext: ReactApplicationContext?, backBtnHandler: DefaultHardwareBackBtnHandler?) : NativeDeviceEventManagerSpec

Native module that handles device hardware events like hardware back presses.

Constructors

Link copied to clipboard
constructor(reactContext: ReactApplicationContext?, backBtnHandler: DefaultHardwareBackBtnHandler?)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Functions

Link copied to clipboard
open override fun canOverrideExistingModule(): Boolean

Return true if you intend to override some other native module that was registered e.g. as part of a different package (such as the core one). Trying to override without returning true from this method is considered an error and will throw an exception during initialization. By default all modules return false.

Link copied to clipboard

Sends an event to the JS instance that the hardware back has been pressed.

Link copied to clipboard
open fun emitNewIntentReceived(uri: Uri)

Sends an event to the JS instance that a new intent was received.

Link copied to clipboard
Link copied to clipboard
open override fun getName(): String
Link copied to clipboard
open override fun initialize()

This method is called after ReactApplicationContext has been created.

Link copied to clipboard
open override fun invalidate()

Allow NativeModule to clean up. Called before React Native instance is destroyed.

Link copied to clipboard
open override fun invokeDefaultBackPressHandler()

Invokes the default back handler for the host of this catalyst instance. This should be invoked if JS does not want to handle the back press itself.

Link copied to clipboard

Allow NativeModule to clean up. Called before {CatalystInstance#onHostDestroy}