For the complete documentation index, see llms.txt. This page is also available as Markdown.

How to Set Up the SDK

To set up the MagTek Universal SDK library for Android, download the 1000007352 MagTek Universal SDK for MMS Devices (Android) available from MagTek.com.

To add the MT Universal libraries to a custom software project in Android Studio, follow these steps:

  • Launch Android Studio.

  • Copy the following AAR file to the libs subfolder of your software project: MTUSDK.aar

  • Ensure your project settings are set up correctly.

  • Clean, build, and run your custom software project to make sure the library imported correctly.

  • In your custom software, create an instance of MTUSDK. For examples, see the source code included with the MagTek Universal Demo project and/or the Code Examples section in this document.

  • Depending on the connection types supported, the project should include the uses-features and uses-permissions as specified in the table below in its AndroidManifest.xml file. For examples, see the AndroidManifest.xml included with the MagTek Universal Demo project.

Connection Type
AndroidManifest

Audio

<uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />

BLE BLEEMV BLEEMVT

<uses-feature android:name="android.hardware.bluetooth_le" /> <uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

Bluetooth

<uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />

USB

<uses-feature android:name="android.hardware.usb.host" />

Serial

WebSocket

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

To Run/Debug the sample code, follow these steps:

  • In Android Studio, select File -> Open ...

  • Select MTUSDKDemo project, click OK.

  • Select Run -> Run app to run the sample code or select Run -> Debug app to run it in debug mode.