public class

AssetManager

extends Object
java.lang.Object
   ↳ com.urbanairship.iam.assets.AssetManager

Class Overview

Manages assets for in-app messages.

Summary

Nested Classes
@interface AssetManager.PrepareResult  
Constants
int PREPARE_RESULT_CANCEL Indicates that the prepare step failed and the schedule should be canceled.
int PREPARE_RESULT_OK Indicates a successful result.
int PREPARE_RESULT_RETRY Indicates that the the prepare step should be retried.
Public Constructors
AssetManager(Context context)
Default constructor.
Public Methods
Assets getAssets(String scheduleId)
Gets the assets for a schedule.
void setCachePolicyDelegate(CachePolicyDelegate cachePolicyDelegate)
Sets the cache policy delegate.
void setPrepareAssetDelegate(PrepareAssetsDelegate assetsDelegate)
Sets the prepare assets delegate.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int PREPARE_RESULT_CANCEL

Indicates that the prepare step failed and the schedule should be canceled.

Constant Value: 2 (0x00000002)

public static final int PREPARE_RESULT_OK

Indicates a successful result.

Constant Value: 0 (0x00000000)

public static final int PREPARE_RESULT_RETRY

Indicates that the the prepare step should be retried.

Constant Value: 1 (0x00000001)

Public Constructors

public AssetManager (Context context)

Default constructor. Applications should not create their own, instead use the asset manager from getAssetManager()

Parameters
context The application context.

Public Methods

public Assets getAssets (String scheduleId)

Gets the assets for a schedule.

Parameters
scheduleId The schedule ID.
Returns
  • The assets.

public void setCachePolicyDelegate (CachePolicyDelegate cachePolicyDelegate)

Sets the cache policy delegate.

Parameters
cachePolicyDelegate The cache policy delegate.

public void setPrepareAssetDelegate (PrepareAssetsDelegate assetsDelegate)

Sets the prepare assets delegate. The delegate is used to populate an Assets instance for a schedule.

To preserve Airship default behavior, extend AirshipPrepareAssetsDelegate and call through to the super's method.

Parameters
assetsDelegate The asset delegate.