PC/Mac/Linux (JVM)
Integration time — 4 minutes.

Requirements

Compatible NFC reader, connected to the computer.

Installation

  1. 1.
    Add Tangem library to the project:
Add to a project build.gradle file:
1
allprojects {
2
repositories {
3
maven { url "https://jitpack.io" }
4
}
5
}
Copied!
And add Tangem library to the dependencies (in an app or module build.gradle file):
1
dependencies {
2
implementation "com.tangem.tangem-sdk-kotlin:core:$latestVersion"
3
implementation "com.tangem.tangem-sdk-kotlin:jvm:$latestVersion"
4
}
Copied!
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. 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 in Device Manager under Smart Card readers header.
  2. 2.
    Initialize TangemSdk interface using this static initializer function:
1
val tangemSdk = TangemSdk.init(
2
verbose = true, // select depending on whether detailed logs are needed
3
indexOfTerminal = 0 // can be omitted when only one NFC reader is connected to the computer
4
)
Copied!
Last modified 7mo ago
Copy link