public class

InAppAutomation

extends AirshipComponent
implements InAppAutomationScheduler
java.lang.Object
   ↳ com.urbanairship.AirshipComponent
     ↳ com.urbanairship.automation.InAppAutomation

Class Overview

In-app automation.

Summary

Public Methods
PendingResult<Boolean> cancelSchedule(String scheduleId)
Cancels an in-app schedule.
PendingResult<Boolean> cancelScheduleGroup(String group)
Cancels in-app schedules by the group.
PendingResult<Boolean> editSchedule(String scheduleId, ScheduleEdits<? extends ScheduleData> edits)
Edits an in-app schedule.
PendingResult<Schedule<Actions>> getActionSchedule(String scheduleId)
Gets an action schedule by ID.
PendingResult<Collection<Schedule<Actions>>> getActionScheduleGroup(String group)
Gets action schedules by group.
PendingResult<Collection<Schedule<Actions>>> getActionSchedules()
Gets all action schedules.
InAppMessageManager getInAppMessageManager()
Gets the in-app message manager.
PendingResult<Schedule<InAppMessage>> getMessageSchedule(String scheduleId)
Gets a message schedule by ID.
PendingResult<Collection<Schedule<InAppMessage>>> getMessageScheduleGroup(String group)
Gets message schedules by group.
PendingResult<Collection<Schedule<InAppMessage>>> getMessageSchedules()
Gets all message schedules.
PendingResult<Collection<Schedule<? extends ScheduleData>>> getSchedules()
boolean isEnabled()
This method is deprecated. Use isEnabled(int) to check FEATURE_IN_APP_AUTOMATION.
boolean isPaused()
Returns true if automations are paused, otherwise false.
void onNewConfig(JsonMap configValue)
Called when a component gets new remote config.
PendingResult<Boolean> schedule(Schedule<? extends ScheduleData> schedule)
Schedules an in-app automation.
PendingResult<Boolean> schedule(List<Schedule<? extends ScheduleData>> schedules)
Schedules a list of in-app automations.
void setEnabled(boolean enabled)
This method is deprecated. Enable/disable by enabling FEATURE_IN_APP_AUTOMATION in PrivacyManager. This will call through to the privacy manager
void setPaused(boolean paused)
Pauses or unpauses automations.
static InAppAutomation shared()
Gets the shared In-App Automation instance.
Protected Methods
void tearDown()
Tear down the manager.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.urbanairship.iam.InAppAutomationScheduler

Public Methods

public PendingResult<Boolean> cancelSchedule (String scheduleId)

Cancels an in-app schedule.

Parameters
scheduleId The in-app schedule ID.
Returns
  • A pending result. The result will be true if success, otherwise false.

public PendingResult<Boolean> cancelScheduleGroup (String group)

Cancels in-app schedules by the group.

Parameters
group The schedule group.
Returns
  • A pending result.

public PendingResult<Boolean> editSchedule (String scheduleId, ScheduleEdits<? extends ScheduleData> edits)

Edits an in-app schedule.

Parameters
scheduleId The schedule ID.
edits The edits.
Returns
  • A pending result with the result.

public PendingResult<Schedule<Actions>> getActionSchedule (String scheduleId)

Gets an action schedule by ID.

Parameters
scheduleId The schedule ID.
Returns
  • A pending result.

public PendingResult<Collection<Schedule<Actions>>> getActionScheduleGroup (String group)

Gets action schedules by group.

Parameters
group The group.
Returns
  • A pending result.

public PendingResult<Collection<Schedule<Actions>>> getActionSchedules ()

Gets all action schedules.

Returns
  • A pending result.

public InAppMessageManager getInAppMessageManager ()

Gets the in-app message manager.

Returns
  • The in-app message manager.

public PendingResult<Schedule<InAppMessage>> getMessageSchedule (String scheduleId)

Gets a message schedule by ID.

Parameters
scheduleId The schedule ID.
Returns
  • A pending result.

public PendingResult<Collection<Schedule<InAppMessage>>> getMessageScheduleGroup (String group)

Gets message schedules by group.

Parameters
group The group.
Returns
  • A pending result.

public PendingResult<Collection<Schedule<InAppMessage>>> getMessageSchedules ()

Gets all message schedules.

Returns
  • A pending result.

public PendingResult<Collection<Schedule<? extends ScheduleData>>> getSchedules ()

public boolean isEnabled ()

This method is deprecated.
Use isEnabled(int) to check FEATURE_IN_APP_AUTOMATION.

Returns true if in-app automation is enabled, false if its disabled.

Returns
  • true if in-app automation is enabled, false if its disabled.

public boolean isPaused ()

Returns true if automations are paused, otherwise false.

Returns
  • true automations are paused, otherwise false.

public void onNewConfig (JsonMap configValue)

Called when a component gets new remote config.

Parameters
configValue The config.

public PendingResult<Boolean> schedule (Schedule<? extends ScheduleData> schedule)

Schedules an in-app automation.

Parameters
schedule The in-app schedule.
Returns
  • A pending result. The result will be true if success, otherwise false.

public PendingResult<Boolean> schedule (List<Schedule<? extends ScheduleData>> schedules)

Schedules a list of in-app automations.

Parameters
schedules The list of schedules.
Returns
  • A pending result. The result will be true if success, otherwise false.

public void setEnabled (boolean enabled)

This method is deprecated.
Enable/disable by enabling FEATURE_IN_APP_AUTOMATION in PrivacyManager. This will call through to the privacy manager

Enables or disables automations.

Parameters
enabled true to enable automations, otherwise false.

public void setPaused (boolean paused)

Pauses or unpauses automations.

Parameters
paused true to pause in-app automations, otherwise false.

public static InAppAutomation shared ()

Gets the shared In-App Automation instance.

Returns
  • The shared In-App Automation instance.

Protected Methods

protected void tearDown ()

Tear down the manager. Called in UAirship during land.