public class

ActionService

extends Service
java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.app.Service
         ↳ com.urbanairship.actions.ActionService

Class Overview

Service class for running actions via push payload.

Summary

Constants
String ACTION_RUN_ACTIONS Intent action for running actions.
String EXTRA_ACTIONS_BUNDLE Intent extra for storing the actions as a bundle of action name to action values.
String EXTRA_METADATA Intent extra for storing metadata as a bundle.
String EXTRA_SITUATION Intent extra for storing the current situation.
[Expand]
Inherited Constants
From class android.app.Service
From class android.content.Context
From interface android.content.ComponentCallbacks2
Public Constructors
ActionService()
Default ActionService constructor.
Public Methods
IBinder onBind(Intent intent)
void onCreate()
int onStartCommand(Intent intent, int flags, int startId)
static void runActions(Context context, Map<StringActionValue> actions, int situation, Bundle metadata)
Convenience method for running actions in the action service.
static void runActions(Context context, String actionsPayload, int situation, Bundle metadata)
Convenience method for running actions in the action service.
[Expand]
Inherited Methods
From class android.app.Service
From class android.content.ContextWrapper
From class android.content.Context
From class java.lang.Object
From interface android.content.ComponentCallbacks
From interface android.content.ComponentCallbacks2

Constants

public static final String ACTION_RUN_ACTIONS

Intent action for running actions.

Constant Value: "com.urbanairship.actionservice.ACTION_RUN_ACTIONS"

public static final String EXTRA_ACTIONS_BUNDLE

Intent extra for storing the actions as a bundle of action name to action values.

Constant Value: "com.urbanairship.actionservice.EXTRA_ACTIONS"

public static final String EXTRA_METADATA

Intent extra for storing metadata as a bundle.

Constant Value: "com.urbanairship.actionservice.EXTRA_METADATA"

public static final String EXTRA_SITUATION

Intent extra for storing the current situation.

Constant Value: "com.urbanairship.actionservice.EXTRA_SITUATION"

Public Constructors

public ActionService ()

Default ActionService constructor.

Public Methods

public IBinder onBind (Intent intent)

public void onCreate ()

public int onStartCommand (Intent intent, int flags, int startId)

public static void runActions (Context context, Map<StringActionValue> actions, int situation, Bundle metadata)

Convenience method for running actions in the action service.

Parameters
context The application context.
actions Map of action name to action values.
situation The action situation.
metadata The action metadata.

public static void runActions (Context context, String actionsPayload, int situation, Bundle metadata)

Convenience method for running actions in the action service.

Parameters
context The application context.
actionsPayload Actions payload.
situation The action situation.
metadata The action metadata.