Class NativeDepsUnpacker


  • public final class NativeDepsUnpacker
    extends java.lang.Object
    Unpacks native deps file from APK to disk. Only needed when native deps are compressed in the APK. The file is extracted on first start, and replaced if the file is corrupt or the APK changes.
    • Method Summary

      Modifier and Type Method Description
      static void ensureNativeDepsAvailable​(android.content.Context context)
      Makes sure that the native deps file has been extracted from the APK to disk so it can be used to load libraries.
      static java.io.File getNativeDepsDir​(android.content.Context context)  
      static java.io.File getNativeDepsFilePath​(android.content.Context context)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getNativeDepsFilePath

        public static java.io.File getNativeDepsFilePath​(android.content.Context context)
      • getNativeDepsDir

        public static java.io.File getNativeDepsDir​(android.content.Context context)
      • ensureNativeDepsAvailable

        public static void ensureNativeDepsAvailable​(android.content.Context context)
                                              throws java.io.IOException
        Makes sure that the native deps file has been extracted from the APK to disk so it can be used to load libraries. If either the file hasn't been extracted, the extracted file is corrupt, or the APK changed, the file will be extracted from the APK. If the file was already extracted, this is a no-op. If extraction fails, an IOException will be thrown.
        Parameters:
        context - application context
        Throws:
        java.io.IOException - IOException