Android
Integration time — 4 minutes.

Requirements

Android with minimal SDK version of 21 and a device with NFC support

Installation

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.github.tangem.tangem-sdk-android:tangem-core:$latestVersion"
3
implementation "com.github.tangem.tangem-sdk-android:tangem-sdk:$latestVersion"
4
}
Copied!
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
1
<resources>
2
<tech-list>
3
<tech>android.nfc.tech.IsoDep</tech>
4
<tech>android.nfc.tech.Ndef</tech>
5
<tech>android.nfc.tech.NfcV</tech>
6
</tech-list>
7
</resources>
Copied!
3. Add to AndroidManifest.xml:
1
<intent-filter>
2
<action android:name=“android.nfc.action.TECH_DISCOVERED” />
3
</intent-filter>
4
<meta-data
5
android:name=“android.nfc.action.TECH_DISCOVERED”
6
android:resource=“@xml/tech_filter” />
7
Copied!

Next steps:

Last modified 7mo ago