java.lang.Object | |
↳ | com.urbanairship.iam.assets.AirshipPrepareAssetsDelegate |
Default PrepareAssetsDelegate
for Airship message types.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | IMAGE_HEIGHT_CACHE_KEY | Cache key for the image height. | |||||||||
String | IMAGE_WIDTH_CACHE_KEY | Cache key for the image width. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AirshipPrepareAssetsDelegate() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static String | getCacheableUrl(MediaInfo mediaInfo) | ||||||||||
int |
onPrepare(String scheduleId, InAppMessage message, Assets assets)
Called to prepare assets for the in-app message before the message is displayed.
| ||||||||||
void |
onSchedule(String scheduleId, InAppMessage message, Assets assets)
Called to prepare assets for the in-app message when the message is scheduled.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
FileUtils.DownloadResult |
cacheImage(Assets assets, String url)
Helper method that caches an image in the assets.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.urbanairship.iam.assets.PrepareAssetsDelegate
|
Cache key for the image height.
Cache key for the image width.
Called to prepare assets for the in-app message before the message is displayed.
scheduleId | The scheduleId. |
---|---|
message | The message. This might be different then schedule's message if the message was extended. |
assets | The assets. |
Called to prepare assets for the in-app message when the message is scheduled. If any assets
fail to download, onPrepare(String, InAppMessage, Assets)
will still
be called before the message is displayed.
scheduleId | The scheduleId. |
---|---|
message | The message. This might be different then schedule's message if the message was extended. |
assets | The assets. |
Helper method that caches an image in the assets.
assets | The assets. |
---|---|
url | The image URL. |
IOException | If the URL is invalid. |
---|