Requesting that the PIN be Unlocked
To perform a PIN unlock request and submit it, perform the following:
Copy
// Create a PIN UNLOCK action Parameter pinParam = new Parameter(); String pin = ......;
pinParam.setId(CCMConstants.ACTION_RUNTIME_PARAM_PIN); pinParam.setParam.setValue(pin); pinParam.setEncoding(Parameter.ENCODING_NONE); pinParam.setType(Parameter.TYPE_STRING);
Parameter[] actionParams = new Parameter[] {pinParam}; SecurityModuleId[] smIds = new SecurityModuleId[]
{ smId };
Action action = new Action(); action.setType(CCMConstants.ACTION_TYPE_PINUNLOCK); action.setRuntimeParameters(actionParams); action.setSecurityModuleIds(smIds);
Action[] actions = new Action[]{action};
// Submit the specified pin unlock action walletMgr.submitActions(walletId, actions, null);