# Android/Kotlin

## Environment Set-up

### Overview

In order to build an `Android` app that uses HAT APIs you first need to install the **HAT API Android** library from [github](https://github.com/Hub-of-all-Things/HAT-API-Android). To do so you can either manually download the library and add it to your project or you can use maven \[*link coming soon*].

### Requirements

* Android studio 3.2
* Kotlin 1.3
* This guide does not show you how to set up the UI; you have to be able to design a basic UI in order to make everything work.

### Install manually

To manually install the library you have to download the repo from github and add it to your project via drag n drop.

### Install via Gradle

#### **Step 1**

In the top-level gradle file, add the jitpack repository link

```kotlin
allprojects {
  repositories {
    maven { url "https://jitpack.io" }
  }
}
```

#### **Step 2**

In your app level gradle file , implement the library dependency

```java
implementation 'com.hubofallthings.android.hatApi:hat:<latest-version>'
```

#### **Step 3**

Sync the project to download the library.

#### **Step 4**

Add internet permission into the AndroidManifest

```markup
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.hubofallthings.myProject">
/>​
```


---

# Agent Instructions: 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:

```
GET https://docs.dataswyft.com/build/advanced-topics/pda-authentication/password-management/tutorials/android-kotlin.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
