Class ContextHolder


  • public class ContextHolder
    extends java.lang.Object
    Holds an Android context. The context must be set for Flyway to be able to scan assets and classes for migrations.

    You can set this within an activity using ContextHolder.setContext(this);

    • Method Summary

      Modifier and Type Method Description
      static android.content.Context getContext()  
      static void setContext​(android.content.Context context)  
      • Methods inherited from class java.lang.Object

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

      • getContext

        public static android.content.Context getContext()
        Returns:
        The Android context to use to be able to scan assets and classes for migrations.
      • setContext

        public static void setContext​(android.content.Context context)
        Parameters:
        context - The Android context to use to be able to scan assets and classes for migrations.