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. 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

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

Step 2

In your app level gradle file , implement the library dependency

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

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.hubofallthings.myProject">
/>ā€‹

Last updated