Find a file
Justin Bassett bf29174a4a
Minimal Android Flavor (#682)
* Initial rip out of most of the Googley stuff.

* Lokalise plugin and dependencies removed.
They would be more useful if we had a large app with many translations.  However, with most of our UI being a PWA the usefulness of it is very limited.

* Both apps now build.... Yay

* Formatting.

* Tests and checks pass.

* Make sure Github Actions are up to date.

* Fix more unit tests.

* ktLint

* Use config class for gradle dependencies.
2020-07-31 07:46:54 -04:00
.github Minimal Android Flavor (#682) 2020-07-31 07:46:54 -04:00
app Minimal Android Flavor (#682) 2020-07-31 07:46:54 -04:00
buildSrc Minimal Android Flavor (#682) 2020-07-31 07:46:54 -04:00
common Fix Biometric Unlock & Enhancement (#625) 2020-07-05 10:09:17 -04:00
data Allow the firebase instance id be optional. (#673) 2020-07-20 09:13:14 -04:00
domain Fix Biometric Unlock & Enhancement (#625) 2020-07-05 10:09:17 -04:00
gradle Feature/switch to kotlin dsl (#595) 2020-06-10 15:16:11 -04:00
.gitignore Alpha application (#4) 2019-11-02 06:38:40 -07:00
build.gradle.kts Update crashlytics. (#624) 2020-06-11 20:49:30 -04:00
CLA.md Add required documents 2019-04-01 22:52:24 -07:00
CODE_OF_CONDUCT.md Update Code of Conduct to 2.0 (#603) 2020-05-26 09:10:31 +02:00
gradle.properties Bump build and androidx versions. (#475) 2020-02-25 20:13:26 -05:00
gradlew Build/Release Changes (#423) 2020-02-13 21:44:28 -05:00
gradlew.bat Build/Release Changes (#423) 2020-02-13 21:44:28 -05:00
LICENSE.md Add required documents 2019-04-01 22:52:24 -07:00
README.md Update Production Release Steps. (#655) 2020-07-05 22:27:03 -04:00
settings.gradle.kts Feature/switch to kotlin dsl (#595) 2020-06-10 15:16:11 -04:00

📱 Home Assistant Companion for Android Beta Deploy

Documentation

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

Setup App 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. If you do not generate your own file push notification will never work

  • 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_mobile_apps channel on Discord.

Push Notifications

If you want to work on push notifications or use a development build with push notifications please go the server side code HERE and deploy it to your firebase project. Once you have your androidV1 URL to the deployed service, exchange that for your local builds PUSH_URL.

Testing Dev Releases

We are using Github Actions to perform continuous integration both by unit testing, deploying dev releases to Play Store Beta and final releases to the Play Store when we release.

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 to the link and click start translating!

Generating a release to production

  • Check over the draft release
  • Add any extra info needed and click Publish Release
  • This will cause a tag to be added to the project and the Production Deploy Workflow will handle the rest