Interface NativeLoaderDelegate
- All Known Implementing Classes:
NativeLoaderToSoLoaderDelegate,SystemDelegate
public interface NativeLoaderDelegate
Interface used to connect chosen loader of native libraries to NativeLoader
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intSkip calling JNI_OnLoad if the library is merged. -
Method Summary
Modifier and TypeMethodDescriptiongetLibraryPath(String libName) intbooleanloadLibrary(String shortName, int flags)
-
Field Details
-
SKIP_MERGED_JNI_ONLOAD
static final int SKIP_MERGED_JNI_ONLOADSkip calling JNI_OnLoad if the library is merged. This is necessary for libraries that don't define JNI_OnLoad and are only loaded for their side effects (like static constructors registering callbacks). DO NOT use this to allow implicit JNI registration (by naming your methods Java_com_facebook_whatever) because that is buggy on Android.- See Also:
-
-
Method Details
-
loadLibrary
- Parameters:
shortName- Name of library to find, without "lib" prefix or ".so" suffixflags- 0 for default behavior, otherwise NativeLoaderDelegate defines other behaviors.- Returns:
- whether load successfully
- See Also:
-
getLibraryPath
- Parameters:
libName- Name of library to find, without "lib" prefix or ".so" suffix- Returns:
- the so file path
- Throws:
IOException- IOException- See Also:
-
getSoSourcesVersion
int getSoSourcesVersion()- Returns:
- The version number for the loader.
- See Also:
-