String passcode = "123456"; // if omitted, the user will be prompted by TangemSDK to enter it
String cardId = card.getCardId();
tangemSdk.setPasscode(passcode, cardId, null, result -> {
if (result instanceof CompletionResult.Success) {
SuccessResponse response = ((CompletionResult.Success<SuccessResponse>) result).getData();
Log.d(TAG, "The passcode was set");
} else if (result instanceof CompletionResult.Failure) {
TangemError error = ((CompletionResult.Failure<SuccessResponse>) result).getError();
Log.d(TAG, error.getCustomMessage());