public class DeviceInfoModule extends BaseJavaModule implements LifecycleEventListener, TurboModule
NativeModule.NativeMethod| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME |
METHOD_TYPE_ASYNC, METHOD_TYPE_PROMISE, METHOD_TYPE_SYNC| Constructor and Description |
|---|
DeviceInfoModule(android.content.Context context) |
DeviceInfoModule(ReactApplicationContext reactContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
emitUpdateDimensionsEvent() |
java.util.Map<java.lang.String,java.lang.Object> |
getConstants() |
java.lang.String |
getName() |
void |
invalidate()
When CatalystInstance is destroyed, this method will be called.
|
void |
onHostDestroy()
Called when host activity receives destroy event (e.g.
|
void |
onHostPause()
Called when host activity receives pause event (e.g.
|
void |
onHostResume()
Called either when the host activity receives a resume event (e.g.
|
canOverrideExistingModule, hasConstants, initialize, onCatalystInstanceDestroypublic static final java.lang.String NAME
public DeviceInfoModule(ReactApplicationContext reactContext)
public DeviceInfoModule(android.content.Context context)
public java.lang.String getName()
getName in interface NativeModulerequire() this module
from javascript.public java.util.Map<java.lang.String,java.lang.Object> getConstants()
getConstants in class BaseJavaModulepublic void onHostResume()
LifecycleEventListenerActivity#onResume or
if the native module that implements this is initialized while the host activity is already
resumed. Always called for the most current activity.onHostResume in interface LifecycleEventListenerpublic void onHostPause()
LifecycleEventListenerActivity#onPause. Always called
for the most current activity.onHostPause in interface LifecycleEventListenerpublic void onHostDestroy()
LifecycleEventListenerActivity#onDestroy. Only called
for the last React activity to be destroyed.onHostDestroy in interface LifecycleEventListenerpublic void emitUpdateDimensionsEvent()
public void invalidate()
TurboModuleinvalidate in interface TurboModuleinvalidate in class BaseJavaModule