/home-assistant-android

:iphone: Home Assistant Companion for Android

Primary LanguageKotlinApache License 2.0Apache-2.0

📱 Home Assistant Companion for Android Build Status

Documentation

If you are looking for documentation around the companion applications check out the Home Assistant Companion Documentation. This will give you instructions on using the applications.

Setup Development Environment

  • Download and install Android Studio

  • Download / clone this repository to a folder on your computer

  • Create a Firebase project at Firebase Console

  • Create two Android apps, one with io.homeassistant.companion.android and one with io.homeassistant.companion.android.debug as package name

  • Now download the google-services.json file and put it in the home-assistant-Android/app folder

    You can also use the mock services file instead of generating your own The file should contain client IDs for io.homeassistant.companion.android and io.homeassistant.companion.android.debug for debugging to work properly

  • Start Android Studio, open your source code folder and check if the Gradle build will be successful

  • If the build is successful, you can run the app by doing the following: click Run -> Run 'app'

  • Connect your phone or create a new virtual device following on screen instruction

  • 🎉

If you get stuck while setting up your own environment, you can ask questions in the #devs_apps channel on Discord.

Testing Dev Releases

We are using Travis to perform continuous integration both by unit testing, deploying dev releases to Firebase App Distribution and final releases to the Play Store when we add a git tag.

Quality

We are using ktlint as our linter. You can run a check locally on your machine with:

./gradlew ktlintCheck

This commands runs on our CI to check if your PR passes all tests. So we strongly recommend running it before committing.

To run a check with an auto-format:

./gradlew ktlintFormat

Translating

The project currently uses lokalise to translate the application. If you are interested in helping translate go the the link and click start translating!