-
- All Implemented Interfaces:
-
com.facebook.react.bridge.NativeModule,com.facebook.react.bridge.ReactModuleWithSpec,com.facebook.react.turbomodule.core.interfaces.TurboModule
public class DeviceEventManagerModule extends NativeDeviceEventManagerSpec
Native module that handles device hardware events like hardware back presses.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceDeviceEventManagerModule.RCTDeviceEventEmitter
-
Constructor Summary
Constructors Constructor Description DeviceEventManagerModule(ReactApplicationContext reactContext, DefaultHardwareBackBtnHandler backBtnHandler)
-
Method Summary
Modifier and Type Method Description voidemitHardwareBackPressed()Sends an event to the JS instance that the hardware back has been pressed. voidemitNewIntentReceived(Uri uri)Sends an event to the JS instance that a new intent was received. voidinvokeDefaultBackPressHandler()Invokes the default back handler for the host of this catalyst instance. StringgetName()-
Methods inherited from class com.facebook.react.bridge.BaseJavaModule
canOverrideExistingModule, getConstants, hasConstants, initialize, invalidate, onCatalystInstanceDestroy -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
DeviceEventManagerModule
DeviceEventManagerModule(ReactApplicationContext reactContext, DefaultHardwareBackBtnHandler backBtnHandler)
-
-
Method Detail
-
emitHardwareBackPressed
void emitHardwareBackPressed()
Sends an event to the JS instance that the hardware back has been pressed.
-
emitNewIntentReceived
void emitNewIntentReceived(Uri uri)
Sends an event to the JS instance that a new intent was received.
-
invokeDefaultBackPressHandler
void invokeDefaultBackPressHandler()
Invokes the default back handler for the host of this catalyst instance. This should be invokedif JS does not want to handle the back press itself.
-
-
-
-