Skip to main content

Installation

Provides API to retrieve additional information about the card from 3rd party vendor's system.

Requirements

  • Device must be able to connect to the Internet.
  • Android version must be 6.0 (API level 23) or above.

Android Studio

It is recommended to use Android Studio and Gradle to build the project.

Gradle Configuration

MTC SDK should be added to the project as a standard Android dependency. SDK is hosted in a private Maven repository, so you need to configure build.gradle by setting the assigned URL and credentials.

Environments:

  • test - test environment
  • prod - production environment

Library Repository and Dependencies

build.gradle
repositories {
maven {
url 'https://nexus.ext.meawallet.com/repository/mtc-android-group/'

credentials {
username '<user>'
password '<password>'
}
}
}

dependencies {
debugImplementation 'com.meawallet:mtc-<environment>:<version>-debug'
releaseImplementation 'com.meawallet:mtc-<environment>:<version>'
}

Configuration

  1. Download mea_config.<issuer>.zip.

  2. Unzip the archive. Archive contains configuration file mea_config.

  3. Add mea_config to Android App resources res/raw folder. Library automatically loads configuration from app bundle during runtime, and throws an exception if configuration file is missing, broken or otherwise fails to load.

Loading Configuration

By default MTC SDK is loading mea_config configuration file, however a custom name can be used. When defining a custom name for the configuration file use MeaTokenControl.Configuration.loadConfig(String) to load the configuration. Configuration file should be placed in application resources res/raw folder.

MeaTokenControl.Configuration.loadConfig("custom_config_name");
info

MTC SDK throws MtcException if configuration file is missing, broken or otherwise fails to load.

App Manifest

It is not necessary to specify any permissions for SDK in AndroidManifest.xml file. A special marker tools:overrideLibrary can be used with uses-sdk declaration to override importing a library with minimum SDK version above application's minimum SDK version. Without such a marker manifest merger fails with an error. The marker allow users to select which libraries can be imported ignoring the minimum SDK version.

MTC SDK is using the following permissions that are merged with the app manifest file:

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>