Client API. The Codename One framework your app is built on: this runs on the device, not in a backend.
public class PushActionCategory
- Object
- PushActionCategory
Encapsulates a category for push notifications. If a push notification specifies a category, and the
app’s main class implements PushActionsProvider, then the push notification will provide a
set of buttons to select among the actions available for that category. If the user selects an
action in the push notification, their choice will be made available inside the PushCallback#push(java.lang.String)
method via the PushContent#getActionId() method.
Applications that wish to support actions must implement PushActionsProvider in its main class. The PushActionsProvider#getPushActionCategories()
implementation defines all of the categories that are available for push notifications.
Constructors
public PushActionCategory(String id, PushAction... actions) | Creates a category with the specified actions. |
Methods
public static PushAction[] getAllActions(PushActionCategory... categories) | Convenience method to return all of the actions in the provided categories. |
public PushAction[] getActions() | Gets the actions in this category. |
public String getId() | Gets the ID of the category. |
Inherited methods
Constructor details
PushActionCategory
public PushActionCategory(String id, PushAction... actions)Parameters
idString- The ID of the category. Should correspond with the “category” of a push notification.
actionsPushAction...- The actions that are available for this category.
Method details
getAllActions
public static PushAction[] getAllActions(PushActionCategory... categories)Parameters
categoriesPushActionCategory...- The categories from which to get actions.
Returns
getActions
public PushAction[] getActions()getId
public String getId()