Installing the SDK Manually for Android

Follow these instructions to manually install the current version of the SDK for Android.
  1. For the Miura reader,
    drag and drop these files into the
    libs
    folder of your project:
    mpos.android.core.aar
    ,
    mpos.android.ui.aar
    ,
    mpos.java.accessories.miura.jar
    ,
    mpos.android.comlinks.bluetooth.aar
    , and
    mpos.java.comlinks.tcp.jar
    .
  2. The SDK requires multiple third-party libraries to be added. These libraries are available through Maven Central. Add the libraries in the
    dependencies
    section of your
    build.gradle
    file:
dependencies { // Add the *.aar wildcard to include any Android libraries in the libs folder implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar']) // Kotlin implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.20' // Google services implementation 'com.google.android.gms:play-services-vision:10.2.1' // Android support libraries implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support:cardview-v7:28.0.0' implementation 'com.android.support:support-v4:28.0.0' implementation 'com.squareup:otto:1.3.5' implementation 'com.squareup.okhttp:okhttp:2.7.4' implementation 'com.parse.bolts:bolts-android:1.2.1' implementation 'com.fasterxml.jackson.core:jackson-databind:2.5.0' implementation 'com.couchbase.lite:couchbase-lite-android:1.4.0' implementation 'com.couchbase.lite:couchbase-lite-android-forestdb:1.4.0' }
Alternatively, you can add the local
libs
directory as a
repository
in the Repositories section in your
build.gradle
file. Adding the directory enables you to specify the SDK libraries similar to the regular integration instructions.
repositories { mavenCentral() flatDir name: 'localRepository', dirs: 'libs' }
4. For version
2.45.0
and higher, make sure the app supports Java 8 features by setting the Compatibility levels:
android{ compileOptions { sourceCompatibility = 1.8 targetCompatibility = 1.8 } }
5. Make sure to update your
AndroidManifest.xml
file to enable a larger heap size by setting
android:largeHeap="true"
. This setting is required to accommodate situations in which an update of the terminals is required and bigger chunks of data are requested and transferred.