Open Doko-Demo-Doa opened 5 years ago
Hello,
I have tried to generate one-time password, but it seems that the SDK had the method being private. I tried modifyKeyboardPassword too, but passwordType is not being used:
modifyKeyboardPassword
public void modifyKeyboardPassword(ExtendedBluetoothDevice extendedBluetoothDevice, int uid, String lockVersion, String adminPs, String unlockKey, int lockFlagPos, int keyboardPwdType, String originalPwd, String newPwd, long startDate, long endDate, String aesKeyStr, long timezoneOffset) { byte[] aesKeyArray = DigitUtil.convertAesKeyStrToBytes(aesKeyStr); LogUtil.d("uid=" + uid + " lockVersion=" + lockVersion + " adminPs=" + adminPs + " unlockKey" + unlockKey + " lockFlagPos=" + lockFlagPos + " aesKeyArray=" + DigitUtil.byteArrayToHexString(aesKeyArray), DBG); TransferData transferData = new TransferData(); transferData.setAPICommand(23); transferData.setmUid(uid); transferData.setLockVersion(lockVersion); transferData.setAdminPs(adminPs); transferData.setUnlockKey(unlockKey); transferData.setLockFlagPos(lockFlagPos); transferData.setStartDate(startDate); transferData.setEndDate(endDate); transferData.setOriginalPwd(originalPwd); transferData.setNewPwd(newPwd); TransferData.setAesKeyArray(aesKeyArray); transferData.setTimezoneOffSet(timezoneOffset); CommandUtil.A_checkAdmin(transferData); }
How can I solve this case?
Anyway, I solved private class problem by subclassing TTLockAPI.java.
TTLockAPI.java
However the passcode generated can be used TWICE, is there a way to prevent it?
Hello,
I have tried to generate one-time password, but it seems that the SDK had the method being private. I tried
modifyKeyboardPassword
too, but passwordType is not being used:How can I solve this case?