public class

InAppMessageCache

extends Object
implements Parcelable
java.lang.Object
   ↳ com.urbanairship.iam.InAppMessageCache

Class Overview

Cache for an in-app message. The cache will automatically be deleted when the in-app message finishes.

Summary

Constants
String IMAGE_HEIGHT_CACHE_KEY Cache key for the image height.
String IMAGE_WIDTH_CACHE_KEY Cache key for the image width.
String MEDIA_CACHE_KEY Cache key for the in-app message media.
[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<InAppMessageCache> CREATOR
Public Methods
boolean delete()
Deletes the cache.
int describeContents()
File file(String fileName)
Creates a new file instance in the cache directory for this in-app message.
Bundle getBundle()
A bundle that can be used to store assets for the in-app message.
static InAppMessageCache newCache(Context context, InAppMessage message)
Factory method.
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Constants

public static final String IMAGE_HEIGHT_CACHE_KEY

Cache key for the image height.

Constant Value: "height"

public static final String IMAGE_WIDTH_CACHE_KEY

Cache key for the image width.

Constant Value: "width"

public static final String MEDIA_CACHE_KEY

Cache key for the in-app message media.

Constant Value: "MEDIA_CACHE_KEY"

Fields

public static final Creator<InAppMessageCache> CREATOR

Public Methods

public boolean delete ()

Deletes the cache.

Returns
  • true if the cache was deleted, otherwise false.

public int describeContents ()

public File file (String fileName)

Creates a new file instance in the cache directory for this in-app message.

Parameters
fileName The file name.
Returns
  • The created file.

public Bundle getBundle ()

A bundle that can be used to store assets for the in-app message.

Returns
  • The bundle.

public static InAppMessageCache newCache (Context context, InAppMessage message)

Factory method.

Returns
  • An cache instance.
Throws
IOException if the cache directory was not able to be created.

public void writeToParcel (Parcel dest, int flags)