User Tools

Site Tools


integration-api:detailed

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
integration-api:detailed [2018/06/26 09:48]
tjotov
integration-api:detailed [2018/06/26 09:57]
tjotov
Line 114: Line 114:
         if (qrHint != null) qrHint.html("");         if (qrHint != null) qrHint.html("");
     }     }
 +
 +The most important method - what API should do when operation finishes (not processed on iOS as we use returnUrl directly there)
 +    aducid.processResult = function(result) {
 +        alert(result);
 +    }
 +
 +How PEIG not installed is treated, marketplace redirect can be used here
 +    aducid.showPeigError = function() {
 +        alert("peig error - override this function")
 +    }
 +
 +
 +Auxiliary method to animate operation in progress
 +    aducid.startAnimation = function() {
 +        if (qrCode != null) {
 +            qrCode.show();
 +            qrCode.attr("src", "/aducid-resources/img/running.gif");
 +        }
 +    }
 +    
 +Stop animation
 +    aducid.stopRunningAnimation = function() {
 +        if (qrCode == null) return;
 +        qrCode.hide();
 +    }
 +
 +
 +This method controll progress bar animation. See aducid-api.js
 +   this.startProgressBar = function(animationTime) {
 +   }
 +
 +
 +Hide QR timer progress bar
 +    aducid.hideProgressBar = function() {
 +        if (qrTimer == null) return;
 +        qrTimer.hide();
 +        qrTimer.html("");
 +    }
 +
 +How errors are treated - use nice dialogues here
 +    aducid.handleError = function(e) {
 +        alert(e);
 +    }
 +