Android SDK - Image Download Module

DOCS

Last updated: Aug 15th, 8:01am

The Image Download module of the SDK exposes the functionality related to retrieving images associated with various wallet artifacts, such as supported payment tenders, for display in the app.

ItemDescription
UI Servicescom.paydiant.android.ui.service.image.ImageDownloadService
Core Servicescom.paydiant.android.core.facade.ImageDowloadManagerFacade

Set UI Package Image Download Listeners

Set an implementation of the applicable listener interfaces in the UI Service class to receive the callback methods returned by the Paydiant service in response to the methods invoked by the Image Download module of the SDK.

ItemDescription
Set Preference Listenervoid setImageDownloadListener(IImageDownloadListener listener);

com.paydiant.android.ui.service.image.IImageDownloadListener
or an overridden instance of com.paydiant.android.ui.service.image.ImageDownloadListenerAdapter| |Remove Listener|void removeListener();

Call from within the corresponding service class to remove the associated listener and set it to null.|

Download Images

Call this method to retrieve the set of images for the specified URLs relevant for the wallet.

ItemDescription
UI Methodvoid loadImageList(List < URL > imageURLList);
ParametersimageURLList - The list of image URLs to be retrieved.
Successvoid onImageDownloadSuccess(Map < String, Bitmap > downloadImageMap);
ParametersdownloadImageMap - The successful call returns a map of bitmap images for each of the URLs specified in the request.
Failurevoid onImageDownloadError(PaydiantException exception);

The failure callback returns an instance of PaydiantException for the module including relevant error codes.
Core MethodList< DownloadImageInfo > downloadImageList(List < DownloadImageInfo > downloadImageList);

Returns aw output for the retrieval results or relevant exception.

Errors

When retrieving the wallet images, the following error is applicable:

ErrorDescription
500An unknown error occurred internally in the server.

Max Pool Size

Call this method to limit the pool size available to the application during download in order to avoid performance impact.

ItemDescription
UI Methodvoid setMaxPoolSize(final int MAX_POOL_SIZE);
Core MethodThere is no Core implementation for this method