目录

Selecting Files from ADF

  1. The pass reader sends the value of readerMatchValue to the applet, and the applet selects the corresponding ADF file. An example command is as follows:
    80CA0080099F3506202004270001

    The pseudocode of the preceding example is as follows:

    String readerMatchValue; / / readerMatchValue field in the JSON object of a pass.
    /* 
    Matching modes of readerMatchValue are as follows:
       9F1E: Match by ReaderId.
       9F35: Match by ReaderType.
    */
    String tag = "9F35";
    String len = String.format(Locale.ENGLISH,"%02X", readerMatchValue.length()/2);
    String tlvStr = tag + len + readerMatchValue;
    String lc = String.format(Locale.ENGLISH,"%02X", tlvStr.length()/2);
    String cmd = "80CA0080" + lc + tlvStr;
    excuteCommand(cmd);
  2. If the operation is successful, 9000 is returned. Otherwise, the pass reader cannot read the pass.