Interface NativeLoaderDelegate

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int SKIP_MERGED_JNI_ONLOAD
      Skip calling JNI_OnLoad if the library is merged.
    • Method Summary

      Modifier and Type Method Description
      java.lang.String getLibraryPath​(java.lang.String libName)  
      int getSoSourcesVersion()  
      boolean loadLibrary​(java.lang.String shortName, int flags)  
    • Field Detail

      • SKIP_MERGED_JNI_ONLOAD

        static final int SKIP_MERGED_JNI_ONLOAD
        Skip 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:
        Constant Field Values
    • Method Detail

      • loadLibrary

        boolean loadLibrary​(java.lang.String shortName,
                            int flags)
        Parameters:
        shortName - Name of library to find, without "lib" prefix or ".so" suffix
        flags - 0 for default behavior, otherwise NativeLoaderDelegate defines other behaviors.
        Returns:
        whether load successfully
        See Also:
        NativeLoader.loadLibrary(String, int)
      • getLibraryPath

        java.lang.String getLibraryPath​(java.lang.String libName)
                                 throws java.io.IOException
        Parameters:
        libName - Name of library to find, without "lib" prefix or ".so" suffix
        Returns:
        the so file path
        Throws:
        java.io.IOException - IOException
        See Also:
        NativeLoader.getLibraryPath(String)