public class FrescoModule extends ReactContextBaseJavaModule implements ModuleDataCleaner.Cleanable
Does not expose any methods to JavaScript code. For initialization and cleanup only.
BaseJavaModule.JavaMethodNativeModule.NativeMethodMETHOD_TYPE_ASYNC, METHOD_TYPE_PROMISE, METHOD_TYPE_SYNC| Constructor and Description |
|---|
FrescoModule(ReactApplicationContext reactContext)
Create a new Fresco module with a default configuration (or the previously given
configuration via
FrescoModule(ReactApplicationContext, ImagePipelineConfig). |
FrescoModule(ReactApplicationContext reactContext,
ImagePipelineConfig config)
Create a new Fresco module with a given ImagePipelineConfig.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearSensitiveData() |
static ImagePipelineConfig.Builder |
getDefaultConfigBuilder(android.content.Context context)
Get the default Fresco configuration builder.
|
java.lang.String |
getName() |
static boolean |
hasBeenInitialized()
Check whether the FrescoModule has already been initialized.
|
void |
initialize()
This is called at the end of
CatalystApplicationFragment#createCatalystInstance()
after the CatalystInstance has been created, in order to initialize NativeModules that require
the CatalystInstance or JS modules. |
getCurrentActivity, getReactApplicationContextcanOverrideExistingModule, getConstants, getMethods, onCatalystInstanceDestroy, supportsWebWorkerspublic FrescoModule(ReactApplicationContext reactContext)
FrescoModule(ReactApplicationContext, ImagePipelineConfig).reactContext - the context to usepublic FrescoModule(ReactApplicationContext reactContext, @Nullable ImagePipelineConfig config)
hasBeenInitialized() to check this and call
FrescoModule(ReactApplicationContext) if it is already initialized.
Otherwise, the given Fresco configuration will be ignored.reactContext - the context to useconfig - the Fresco configuration, which will only be used for the first initializationpublic void initialize()
NativeModuleCatalystApplicationFragment#createCatalystInstance()
after the CatalystInstance has been created, in order to initialize NativeModules that require
the CatalystInstance or JS modules.initialize in interface NativeModuleinitialize in class BaseJavaModulepublic java.lang.String getName()
getName in interface NativeModulerequire() this module
from javascript.public void clearSensitiveData()
clearSensitiveData in interface ModuleDataCleaner.Cleanablepublic static boolean hasBeenInitialized()
FrescoModule(ReactApplicationContext, ImagePipelineConfig) will
ignore the given configuration.public static ImagePipelineConfig.Builder getDefaultConfigBuilder(android.content.Context context)
ImagePipelineConfig.Builder that has been initialized with default values