I have this code in my custom library:
function loadPreviewImage() {
if ($el.parent()) {
var transaction = folio.getPreviewImage(180, 135, false);
console.log('loadPreviewImage ' + transaction);
transaction.completedSignal.addOnce(getPreviewImageHandler, this);
}
}
function getPreviewImageHandler(transaction) {
console.log('transaction.previewImageURL ' + transaction.previewImageURL);
if (transaction.state == adobeDPS.transactionManager.transactionStates.FINISHED && transaction.previewImageURL != null) {
$folioThumb.attr("src", transaction.previewImageURL);
} else if (transaction.previewImageURL == null) { // Sometimes previewImageURL is null so attempt another reload.
setTimeout(function () {
var transaction = folio.getPreviewImage(180, 135, false);
transaction.completedSignal.addOnce(scope.getPreviewImageHandler, _scope);
}, 200);
}
}
where on loadPreviewImage() method I get the folios preview images and register the completion event handler.
I log both methods to see what is happening and notice that while loadPreviewImage() gets called every time getPreviewImageHandler is not.
I'm testing on a ipad with iOS 8.1.