Class DynamicPriority

java.lang.Object
com.pranavpandey.android.dynamic.engine.model.DynamicPriority

public class DynamicPriority extends Object
Helper class to manage priority of the different events in case two or more events will occur simultaneously.
  • Field Details

    • ADE_PREF_EVENTS_PRIORITY

      public static final String ADE_PREF_EVENTS_PRIORITY
      Shared preference key for the event priorities.
      See Also:
    • ADE_PRIORITY_SPLIT

      public static final String ADE_PRIORITY_SPLIT
      DynamicPriority splitter to separate different events.
      See Also:
  • Constructor Details

    • DynamicPriority

      public DynamicPriority()
  • Method Details

    • resetPriority

      public static void resetPriority(@NonNull Context context)
      Reset the events priority to default.
      Parameters:
      context - The context to get shared preferences.
      See Also:
      • ADE_DEFAULT_EVENTS_PRIORITY
    • saveEventsPriority

      public static void saveEventsPriority(@NonNull Context context, @NonNull List<String> eventsPriority)
      Save the events priority.
      Parameters:
      context - The context to get shared preferences.
      eventsPriority - The list containing events priority.
    • getDefaultEventsPriority

      public static List<String> getDefaultEventsPriority(@NonNull Context context)
      Get the default events priority after checking the telephony functionality.
      Parameters:
      context - The context to get shared preferences.
      Returns:
      The default events priority.
    • getEventsPriority

      @NonNull public static List<String> getEventsPriority(@NonNull Context context)
      Get the saved events priority after checking the device for telephony and per app functionality.
      Parameters:
      context - The context to get shared preferences.
      Returns:
      The saved events priority.