> For the complete documentation index, see [llms.txt](https://developer.magtek.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.magtek.com/sdks-and-tools/universal-sdk-documentation/android/how-to-set-up-the-sdk.md).

# 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              | <p><code>\<uses-permission android:name="android.permission.RECORD\_AUDIO" /></code><br><code>\<uses-permission android:name="android.permission.MODIFY\_AUDIO\_SETTINGS" /></code></p>                                                                                                                                                                                                                                                                    |
| BLE BLEEMV BLEEMVT | <p><code>\<uses-feature android:name="android.hardware.bluetooth\_le" /></code><br><code>\<uses-permission android:name="android.permission.BLUETOOTH" /></code><br><code>\<uses-permission android:name="android.permission.BLUETOOTH\_ADMIN" /></code><br><code>\<uses-permission android:name="android.permission.ACCESS\_COARSE\_LOCATION" /></code><br><code>\<uses-permission android:name="android.permission.ACCESS\_FINE\_LOCATION" /></code></p> |
| Bluetooth          | <p><code>\<uses-permission android:name="android.permission.BLUETOOTH" /></code><br><code>\<uses-permission android:name="android.permission.BLUETOOTH\_ADMIN" /></code></p>                                                                                                                                                                                                                                                                               |
| 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.magtek.com/sdks-and-tools/universal-sdk-documentation/android/how-to-set-up-the-sdk.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
