mirror of
https://github.com/home-assistant/android
synced 2024-10-15 04:22:54 +00:00
Update instructions for running the project from the scratch (#837)
* Update instructions for running the project from the scratch * Update README.md Co-authored-by: Justin Bassett <bassett.justint@gmail.com> Co-authored-by: Justin Bassett <bassett.justint@gmail.com>
This commit is contained in:
parent
83c4dbb92c
commit
1d31d8743a
19
README.md
19
README.md
|
@ -11,15 +11,28 @@ If you are looking for documentation around the companion applications check out
|
||||||
|
|
||||||
- Create a Firebase project at [Firebase Console](https://console.firebase.google.com)
|
- Create a Firebase project at [Firebase Console](https://console.firebase.google.com)
|
||||||
|
|
||||||
- Create two Android apps, one with `io.homeassistant.companion.android` and one with `io.homeassistant.companion.android.debug` as package name
|
- Create four Android apps, with following package names
|
||||||
|
- `io.homeassistant.companion.android`
|
||||||
|
- `io.homeassistant.companion.android.debug`
|
||||||
|
- `io.homeassistant.companion.android.minimal`
|
||||||
|
- `io.homeassistant.companion.android.minimal.debug`
|
||||||
|
|
||||||
- Now download the `google-services.json` file and put it in the _home-assistant-Android/app_ folder
|
- Now download the `google-services.json` file and put it in the _home-assistant-Android/app_ folder. This file contains the configuration of the whole project (all the four applications).
|
||||||
|
|
||||||
[You can also use the mock services file instead of generating your own](/.github/mock-google-services.json)
|
[You can also use the mock services file instead of generating your own](/.github/mock-google-services.json)
|
||||||
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**
|
The file should contain client IDs for all packages listed above 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
|
- Start Android Studio, open your source code folder and check if the Gradle build will be successful
|
||||||
|
|
||||||
|
- Create keystore containing keypair for debug application signing. In Android Studio: Menu/Build/Generate signed APK, then use a button to create new keystore. Remember the passwords and key alias
|
||||||
|
|
||||||
|
- Set environmental variables used in `app/build.gradle.kts`:
|
||||||
|
- `KEYSTORE_PASSWORD`
|
||||||
|
- `KEYSTORE_ALIAS`
|
||||||
|
- `KEYSTORE_ALIAS_PASSWORD`
|
||||||
|
|
||||||
|
- Run the build using `gradlew build` from command line.
|
||||||
|
|
||||||
- If the build is successful, you can run the app by doing the following: click **Run** -> **Run 'app'**
|
- 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
|
- Connect your phone or create a new virtual device following on screen instruction
|
||||||
|
|
Loading…
Reference in a new issue