PC/Mac/Linux (JVM)
Integration time — 4 minutes.
Compatible NFC reader, connected to the computer.
- 1.Add Tangem library to the project:
Add to a project
build.gradle
file:allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
And add Tangem library to the dependencies (in an app or module
build.gradle
file):dependencies {
implementation "com.tangem.tangem-sdk-kotlin:core:$latestVersion"
implementation "com.tangem.tangem-sdk-kotlin:jvm:$latestVersion"
}
tangem-core
is a JVM library that provides core functionality of interacting with Tangem cards. tangem-jvm
is a JVM library that allowes to use Tangem core library with NFC readers connected to a Windows/Linux/Mac computer.- 1.Make sure that external reader is connected and that all the necessary drivers are installed so that the system have access to the reader. On Mac and Linux execute the terminal command
pcsctest
to check that the reader is connected. This command lists all available connected readers.On Windows available readers should be listed inDevice Manager
underSmart Card readers
header. - 2.Initialize TangemSdk interface using this static initializer function:
val tangemSdk = TangemSdk.init(
verbose = true, // select depending on whether detailed logs are needed
indexOfTerminal = 0 // can be omitted when only one NFC reader is connected to the computer
)
Last modified 2yr ago