createCustomPasscode static method

void createCustomPasscode(
  1. String passcode,
  2. int startDate,
  3. int endDate,
  4. String lockData,
  5. TTSuccessCallback callback,
  6. TTFailedCallback failedCallback,
)

Create custom passcode

passcode The passcode is limited to 4 - 9 digits startDate The time(millisecond) when it becomes valid endDate The time(millisecond) when it is expired lockData The lock data string used to operate lock callback A callback invoked when passcode is created failedCallback A callback invoked when the operation fails

Implementation

static void createCustomPasscode(
      String passcode,
      int startDate,
      int endDate,
      String lockData,
      TTSuccessCallback callback,
      TTFailedCallback failedCallback) {
    Map map = Map();
    map[TTResponse.passcode] = passcode;
    map[TTResponse.startDate] = startDate;
    map[TTResponse.endDate] = endDate;
    map[TTResponse.lockData] = lockData;
    invoke(COMMAND_CREATE_CUSTOM_PASSCODE, map, callback, fail: failedCallback);
  }