Android
Integration time — 4 minutes.
Android with minimal SDK version of 21 and a device with NFC support
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.github.tangem.tangem-sdk-android:tangem-core:$latestVersion"
implementation "com.github.tangem.tangem-sdk-android:tangem-sdk:$latestVersion"
}
tangem-core
is a JVM library (without Android dependencies) that provides core functionality of interacting with Tangem cards. tangem-sdk
is an Android library that implements NFC interaction between Android devices and Tangem cards and graphical interface for this interaction.2. Save the file (you can name it anything you wish) with the following tech-list filters in the
<project-root>/res/xml
<resources>
<tech-list>
<tech>android.nfc.tech.IsoDep</tech>
<tech>android.nfc.tech.Ndef</tech>
<tech>android.nfc.tech.NfcV</tech>
</tech-list>
</resources>
3. Add to
AndroidManifest.xml
:<intent-filter>
<action android:name=“android.nfc.action.TECH_DISCOVERED” />
</intent-filter>
<meta-data
android:name=“android.nfc.action.TECH_DISCOVERED”
android:resource=“@xml/tech_filter” />
Last modified 1yr ago