This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
integration-api:detailed [2018/06/26 09:46] tjotov |
integration-api:detailed [2018/06/26 09:57] tjotov |
||
---|---|---|---|
Line 58: | Line 58: | ||
} | } | ||
- | button | + | Button |
aducid.setButton = function(param) { | aducid.setButton = function(param) { | ||
aducidButton = param; | aducidButton = param; | ||
Line 95: | Line 95: | ||
} | } | ||
+ | Text hint shown before operation started | ||
aducid.showQRHint = function(param) { | aducid.showQRHint = function(param) { | ||
if (qrHint != null) qrHint.html(localize(" | if (qrHint != null) qrHint.html(localize(" | ||
} | } | ||
+ | How API can hide text hint | ||
aducid.hideQRHint = function(param) { | aducid.hideQRHint = function(param) { | ||
if (qrHint != null) qrHint.html("" | if (qrHint != null) qrHint.html("" | ||
} | } | ||
+ | Text hint shown after operation started | ||
aducid.showRunningHint = function(param) { | aducid.showRunningHint = function(param) { | ||
if (qrHint != null) qrHint.html(localize(" | if (qrHint != null) qrHint.html(localize(" | ||
} | } | ||
+ | How API can hide text hint | ||
aducid.hideRunningHint = function(param) { | aducid.hideRunningHint = function(param) { | ||
if (qrHint != null) qrHint.html("" | if (qrHint != null) qrHint.html("" | ||
} | } | ||
- | //Params | + | The most important method - what API should do when operation finishes (not processed on iOS as we use returnUrl directly there) |
- | | + | |
- | "publicMethod" | + | |
- | "id" | + | } |
- | }; | + | |
+ | 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", | ||
+ | | ||
+ | } | ||
+ | |||
+ | Stop animation | ||
+ | aducid.stopRunningAnimation = function() { | ||
+ | if (qrCode == null) return; | ||
+ | qrCode.hide(); | ||
+ | } | ||
+ | |||
+ | |||
+ | This method controll progress bar animation. See aducid-api.js | ||
+ | | ||
+ | } | ||
+ | |||
+ | |||
+ | 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); | ||
+ | } | ||
+ | |||
+ |