Package es.situm.sdk.location
Enum Class ForegroundServiceNotificationOptions.TapAction
java.lang.Object
java.lang.Enum<ForegroundServiceNotificationOptions.TapAction>
es.situm.sdk.location.ForegroundServiceNotificationOptions.TapAction
- All Implemented Interfaces:
Serializable,Comparable<ForegroundServiceNotificationOptions.TapAction>,Constable
- Enclosing class:
- ForegroundServiceNotificationOptions
public static enum ForegroundServiceNotificationOptions.TapAction
extends Enum<ForegroundServiceNotificationOptions.TapAction>
Predefined actions performed when tapping the Situm Foreground Service Notification.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDo nothing when tapping the Notification.Launch the app's main activity using the information returned byPackageManager.getLaunchIntentForPackage(String).Launch the operating system settings screen for the current app. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
LAUNCH_APP
Launch the app's main activity using the information returned byPackageManager.getLaunchIntentForPackage(String).The Intent used with LAUNCH_APP contains an extra
SITUM_EXTRA_LAUNCH_APPthat allows you to detect whether the app launch comes from a notification. You can check this extra in your activity to determine the source of the launch.protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Intent intent = getIntent(); if (intent != null && intent.hasExtra(ForegroundServiceNotificationOptions.SITUM_EXTRA_LAUNCH_APP)) { // Handle the launch from the notification handleNotificationLaunch(); } else { // Handle the normal launch handleNormalLaunch(); } } -
DO_NOTHING
Do nothing when tapping the Notification. -
LAUNCH_SETTINGS
Launch the operating system settings screen for the current app.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-