Namespace hcap.mode

hcap.mode

Namespace Summary
Constructor Attributes Constructor Name and Description
 

Method Summary

Namespace Detail

hcap.mode

Field Detail

<static> <constant> hcap.mode.HCAP_MODE_0
HCAP mode 0
Since:
1.3.1
<static> <constant> hcap.mode.HCAP_MODE_1
HCAP mode 1
Since:
1.3.1
<static> <constant> hcap.mode.HCAP_MODE_2
HCAP mode 2
Since:
1.3.1
<static> <constant> hcap.mode.HCAP_MODE_3
HCAP mode 3
Since:
1.3.1
<static> <constant> hcap.mode.HCAP_MODE_4
HCAP mode 4
Since:
1.3.1

Method Detail

  • <static> hcap.mode.getHcapMode(param)
    Gets the current HCAP mode.

    Hcap mode is related to the application visibility and the key control.

    Following table specifies application visibility for each HCAP mode.
    HCAP_MODE_0 HCAP_MODE_1 HCAP_MODE_2 HCAP_MODE_3 HCAP_MODE_4
    Application Visibility X O O O O
    HCAP Mode & Application Visibility (O : visible, X : invisible)

    Following table specifies whether key is delivered to application or not for each HCAP mode.
    (O : key is delivered to application, X : key is not delivered to application)
    hcap.mode.getHcapMode({
         "onSuccess" : function(s) {
             console.log("onSuccess : current hcap mode = " + s.mode);
         }, 
         "onFailure" : function(f) {
             console.log("onFailure : errorMessage = " + f.errorMessage);
         }
    });
    Parameters:
    {Object} param
    • {Function} param.onSuccess [Optional] - success callback function.
        param.onSuccess = function (param) {
            // {Number} param.mode - HCAP mode.
        }
    • {Function} param.onFailure [Optional] - failure callback function.
        param.onFailure = function (param) {
            // {String} param.errorMessage - in case of failure, this message provides the details.
        }
    Since:
    1.3.1
    See:
    hcap.mode.setHcapMode()
    HCAP_MODE_0
    HCAP_MODE_1
    HCAP_MODE_2
    HCAP_MODE_3
    HCAP_MODE_4
  • <static> hcap.mode.setHcapMode(param)
    Sets the HCAP mode.
    Please refer to hcap.mode.getHcapMode() for the detailed information regarding the HCAP mode.
    hcap.mode.setHcapMode({
         "mode" : hcap.mode.HCAP_MODE_2,
         "onSuccess" : function() {
             console.log("onSuccess");
         }, 
         "onFailure" : function(f) {
             console.log("onFailure : errorMessage = " + f.errorMessage);
         }
    });
    Parameters:
    {Object} param
    • {Number} param.mode [Required] - HCAP mode.
    • {Function} param.onSuccess [Optional] - success callback function.
      Setting to the same HCAP mode as before will invoke this callback function.
        param.onSuccess = function() {
            // No parameter.
        }
    • {Function} param.onFailure [Optional] - failure callback function.
        param.onFailure = function (param) {
            // {String} param.errorMessage - in case of failure, this message provides the details.
        }
    Since:
    1.3.1
    See:
    hcap.mode.getHcapMode()
    HCAP_MODE_0
    HCAP_MODE_1
    HCAP_MODE_2
    HCAP_MODE_3
    HCAP_MODE_4