Updated on 2026-08-14

This commit is contained in:
Tangem 2020-05-19 14:19:08 +00:00
commit 269707cd78
2 changed files with 5 additions and 2 deletions

View file

@ -9,8 +9,8 @@ android {
applicationId "com.tangem.devkit"
minSdkVersion 21
targetSdkVersion 29
versionCode 3
versionName "1.1"
versionCode 4
versionName "1.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View file

@ -10,6 +10,7 @@ import com.tangem.TangemSdkError
import com.tangem.common.CompletionResult
import com.tangem.common.apdu.CommandApdu
import com.tangem.common.apdu.ResponseApdu
import com.tangem.common.extensions.toHexString
/**
* Provides NFC communication between an Android application and Tangem card.
@ -76,7 +77,9 @@ class NfcReader : CardReader {
val rawResponse: ByteArray?
try {
Log.i(this::class.simpleName!!, "Sending data to the card, size is ${data?.size}")
Log.v(this::class.simpleName!!, "Raw data that is to be send to the card: ${data?.toHexString()}")
rawResponse = isoDep?.transceive(data)
Log.v(this::class.simpleName!!, "Raw data that was received from the card: ${rawResponse?.toHexString()}")
} catch (exception: TagLostException) {
callback?.invoke(CompletionResult.Failure(TangemSdkError.TagLost()))
isoDep = null