Class DynamicPriority
java.lang.Object
com.pranavpandey.android.dynamic.engine.model.DynamicPriority
Helper class to manage priority of the different events in case two or more events will
occur simultaneously.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetDefaultEventsPriority
(Context context) Get the default events priority after checking the telephony functionality.getEventsPriority
(Context context) Get the saved events priority after checking the device for telephony and per app functionality.static void
resetPriority
(Context context) Reset the events priority to default.static void
saveEventsPriority
(Context context, List<String> eventsPriority) Save the events priority.
-
Field Details
-
ADE_PREF_EVENTS_PRIORITY
Shared preference key for the event priorities.- See Also:
-
ADE_PRIORITY_SPLIT
DynamicPriority splitter to separate different events.- See Also:
-
-
Constructor Details
-
DynamicPriority
public DynamicPriority()
-
-
Method Details
-
resetPriority
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
Get the default events priority after checking the telephony functionality.- Parameters:
context
- The context to get shared preferences.- Returns:
- The default events priority.
-
getEventsPriority
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.
-