-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change structure of the project so we can support multiple sample app… (
#153) Change structure of the project so we can support multiple sample applications in the future. The only sample app we current have ("app") is renamed "3p-ecosystem" so that each sample app is given a proper descriptive name.
- Loading branch information
1 parent
0e22c14
commit ee11802
Showing
218 changed files
with
370 additions
and
348 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# Google Home Sample App for Matter -- 3p-ecosystem | ||
|
||
The **Google Home Sample App for Matter** (GHSAFM-3p-ecosystem) provides a concrete example of how to | ||
use the [Home Mobile SDK](https://developers.home.google.com/matter/apis/home) to make it | ||
easy to commission and share [Matter](https://developers.home.google.com/matter/overview) devices | ||
across Apps and ecosystems. It also demonstrates how to use commissioning and Cluster libraries | ||
from the | ||
[Matter repo (`connectedhomeip`)](https://github.com/project-chip/connectedhomeip). | ||
|
||
This is a sample application that can be used as the starting point to build your | ||
smart home application for Matter devices. | ||
|
||
It can also be used as a learning tool to better understand key Matter concepts, as well as a tool | ||
to debug and troubleshoot interactions with Matter devices. | ||
|
||
## Clone the repository | ||
|
||
The Sample app GitHub repository includes third party libraries from the | ||
[Matter repo (`connectedhomeip`)](https://github.com/project-chip/connectedhomeip). | ||
These native libraries are over 50MB, and require the use of Git Large File | ||
Storage (LFS). | ||
|
||
To clone the repository, complete the following steps: | ||
|
||
1. Install [Git LFS](https://git-lfs.github.com/). | ||
|
||
2. Initialize Git LFS. | ||
|
||
```console | ||
$ git lfs install | ||
``` | ||
|
||
When complete, the console displays the following: | ||
|
||
```console | ||
Updated Git hooks. | ||
Git LFS initialized. | ||
``` | ||
|
||
3. Once Git LFS is installed and initialized, you're ready to clone the | ||
repository. When cloning completes, Git checks out the `main` branch | ||
and downloads the native libraries for you. | ||
|
||
```console | ||
$ git clone https://github.com/google-home/sample-apps-for-matter-android.git | ||
``` | ||
|
||
## Version | ||
|
||
Google Home Sample App for Matter follows the [Semantic](http://semver.org/) | ||
and [Android](https://developer.android.com/studio/publish/versioning) versioning guidelines for | ||
release cycle transparency and to maintain backwards compatibility. | ||
|
||
## Releases | ||
|
||
Always use the latest release as shown at | ||
https://github.com/google-home/sample-apps-for-matter-android/releases | ||
|
||
## Get started | ||
|
||
* Check the presentation "Building Smart Home Apps with the Google Home Mobile SDK" | ||
(docs/GoogleHomeMobileSDK.pdf) for an overview of the Sample App and key APIs | ||
of the Mobile SDK. | ||
* To make sure that your device has the latest Matter support, review the | ||
[Verify Matter Modules & Services](https://developers.home.google.com/matter/verify-services) | ||
guide. | ||
* Build a Matter device with On/Off capabilities. This sample app works with a virtual device | ||
and an ESP32. | ||
* [Build a Matter Virtual Device](https://developers.home.google.com/codelabs/matter-device-virtual) | ||
with the `rootnode_dimmablelight_bCwGYSDpoe` app. When you | ||
[Create a Matter integration](https://developers.home.google.com/matter/integration/create) | ||
in the [Home Developer Console](https://console.home.google.com/projects), | ||
use `0xFFF1` as your Vendor ID and `0x8000` as your Product ID. | ||
* [Build an Espressif Device](https://developers.home.google.com/matter/vendors/espressif) | ||
with the `all-clusters-app`. When you | ||
[Create a Matter integration](https://developers.home.google.com/matter/integration/create) | ||
in the [Home Developer Console](https://console.home.google.com/projects), | ||
use `0xFFF1` as your Vendor ID and `0x8001` as your Product ID. | ||
* For an overview of the user interface and features, refer to | ||
the [Google Home Sample App for Matter Guide](https://developers.home.google.com/samples/matter-app). | ||
* To review code samples and start building, refer to | ||
the [Build an Android App for Matter](https://developers.home.google.com/codelabs/matter-sample-app) | ||
Codelab. | ||
|
||
## Issues? | ||
|
||
If you run into problems with the sample app, please submit an issue on the | ||
[Issues page](https://github.com/google-home/sample-apps-for-matter-android/issues). | ||
|
||
It is always greatly appreciated if you can try to reproduce the issue you encountered | ||
from a clean state as described in document | ||
["How to investigate issues with GHSAFM‐3p‐ecosystem"](https://github.com/google-home/sample-apps-for-matter-android/wiki/How-to-investigate-issues-with-GHSAFM%E2%80%903p%E2%80%90ecosystem). | ||
|
||
## License | ||
|
||
Google Home Sample App for Matter is licensed under | ||
the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0). | ||
|
||
Only use the Google Home Sample App for Matter name and marks when accurately referencing this | ||
software distribution. Do not use the marks in a way that suggests you are endorsed by or otherwise | ||
affiliated with Nest, Google, or the Connectivity Standards Alliance (CSA). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
plugins { | ||
id("com.android.application") | ||
id("org.jetbrains.kotlin.android") | ||
id("com.google.protobuf") version "0.9.1" | ||
id("org.jetbrains.kotlin.kapt") | ||
id("dagger.hilt.android.plugin") | ||
id("androidx.navigation.safeargs") | ||
id("com.google.dagger.hilt.android") | ||
id("com.ncorti.ktfmt.gradle") version "0.12.0" | ||
} | ||
|
||
android { | ||
namespace = "com.google.homesampleapp" | ||
compileSdk = 33 | ||
|
||
defaultConfig { | ||
// DeviceSharingClone: Change this value for the target commissioner cloned app | ||
applicationId = "com.google.homesampleapp" | ||
minSdk = 27 | ||
targetSdk = 33 | ||
versionCode = 15 | ||
versionName = "1.4.1" | ||
testInstrumentationRunner = "com.google.homesampleapp.CustomTestRunner" | ||
} | ||
|
||
buildTypes { | ||
getByName("release") { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro") | ||
} | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
kotlinOptions { | ||
jvmTarget = "17" | ||
} | ||
buildFeatures { | ||
dataBinding = true | ||
} | ||
sourceSets { | ||
getByName("main") { | ||
jniLibs.srcDirs(listOf("third_party/connectedhomeip/libs/jniLibs")) | ||
} | ||
} | ||
android.buildFeatures.viewBinding = true | ||
|
||
// Specifies one flavor dimension. | ||
flavorDimensions += "version" | ||
productFlavors { | ||
create("default") { | ||
dimension = "version" | ||
applicationIdSuffix = ".default" | ||
versionNameSuffix = "-default" | ||
} | ||
create("targetcommissioner") { | ||
dimension = "version" | ||
applicationIdSuffix = ".targetcommissioner" | ||
versionNameSuffix = "-targetcommissioner" | ||
} | ||
} | ||
// Gradle will use the NDK that"s associated by default with its plugin. | ||
// If it"s not available (from the SDK Manager), then stripping the .so"s will not happen | ||
// (message: Unable to strip library...) | ||
// See https://github.com/google-home/sample-app-for-matter-android/issues/82. | ||
// https://developer.android.com/studio/projects/install-ndk | ||
// If you want to use a specific NDK, then uncomment the statement below with the proper | ||
// NDK version. | ||
// ndkVersion = "25.2.9519653" | ||
} | ||
|
||
dependencies { | ||
// Native libs | ||
implementation(fileTree(mapOf("dir" to "third_party/connectedhomeip/libs", "include" to listOf("*.jar", "*.so")))) | ||
|
||
// Connected Home | ||
implementation("com.google.android.gms:play-services-base:18.2.0") | ||
implementation("com.google.android.gms:play-services-home:16.0.0") | ||
|
||
// AndroidX | ||
implementation("androidx.appcompat:appcompat:1.6.1") | ||
implementation("androidx.constraintlayout:constraintlayout:2.1.4") | ||
implementation("androidx.core:core-ktx:1.10.1") | ||
implementation("androidx.databinding:databinding-runtime:8.0.2") | ||
implementation("androidx.legacy:legacy-support-v4:1.0.0") | ||
implementation("androidx.preference:preference:1.2.0") | ||
|
||
// Navigation | ||
implementation("androidx.navigation:navigation-fragment-ktx:2.6.0") | ||
implementation("androidx.navigation:navigation-ui-ktx:2.6.0") | ||
|
||
// Lifecycle | ||
implementation("androidx.lifecycle:lifecycle-extensions:2.2.0") | ||
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.6.1") | ||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1") | ||
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1") | ||
|
||
// Datastore | ||
implementation("androidx.datastore:datastore:1.0.0") | ||
implementation("androidx.datastore:datastore-core:1.0.0") | ||
implementation("com.google.protobuf:protobuf-javalite:3.18.0") | ||
|
||
// Hilt | ||
// https://dagger.dev/hilt/gradle-setup | ||
implementation("com.google.dagger:hilt-android:2.46.1") | ||
kapt("com.google.dagger:hilt-compiler:2.46.1") | ||
implementation("com.google.ar:core:1.38.0") | ||
|
||
|
||
// Hilt For instrumentation tests | ||
androidTestImplementation("com.google.dagger:hilt-android-testing:2.44.2") | ||
kaptAndroidTest("com.google.dagger:hilt-compiler:2.46.1") | ||
|
||
// Task.await() | ||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.6.4") | ||
|
||
// Other | ||
implementation("com.google.android.material:material:1.9.0") | ||
implementation("com.jakewharton.timber:timber:5.0.1") | ||
|
||
// Test | ||
testImplementation("junit:junit:4.13.2") | ||
androidTestImplementation("androidx.test.ext:junit:1.1.5") | ||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") | ||
androidTestImplementation("androidx.test.espresso:espresso-intents:3.5.1") | ||
androidTestImplementation("androidx.test.espresso:espresso-contrib:3.5.1") | ||
androidTestImplementation("androidx.test:runner:1.5.2") | ||
androidTestImplementation("androidx.test:rules:1.5.0") | ||
androidTestImplementation("androidx.test.uiautomator:uiautomator:2.2.0") | ||
} | ||
|
||
// Issue with androidx.test.espresso:espresso-contrib:3.5.1 | ||
// https://github.com/android/android-test/issues/999 | ||
configurations.configureEach { | ||
exclude(group = "com.google.protobuf", module = "protobuf-lite") | ||
} | ||
|
||
kapt { | ||
correctErrorTypes = true | ||
} | ||
|
||
protobuf { | ||
protoc { | ||
// For Apple M1 Chip | ||
val isMac = System.getProperty("os.name").toLowerCase().contains("mac") | ||
val protocDepSuffix = if (isMac) ":osx-x86_64" else "" | ||
artifact = "com.google.protobuf:protoc:3.14.0" + protocDepSuffix | ||
} | ||
|
||
// Generates the java Protobuf-lite code for the Protobufs in this project. See | ||
// https://github.com/google/protobuf-gradle-plugin#customizing-protobuf-compilation | ||
// for more information. | ||
generateProtoTasks { | ||
all().forEach { task -> | ||
task.builtins { | ||
create("java") { | ||
option("lite") | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
3p-ecosystem/third_party/connectedhomeip/libs/jniLibs/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
This directory will contain .so files required by CHIPTool demo app for Android. | ||
The .so files must be organized into folders by the name of the corresponding | ||
Android architecture for which they are built, eg. arm64-v8a, x86, x86_64, etc. |
Binary file added
BIN
+25.3 MB
3p-ecosystem/third_party/connectedhomeip/libs/jniLibs/arm64-v8a/libCHIPController.so
Binary file not shown.
Binary file added
BIN
+333 KB
3p-ecosystem/third_party/connectedhomeip/libs/jniLibs/arm64-v8a/libSetupPayloadParser.so
Binary file not shown.
Binary file added
BIN
+998 KB
3p-ecosystem/third_party/connectedhomeip/libs/jniLibs/arm64-v8a/libc++_shared.so
Binary file not shown.
Binary file added
BIN
+11.9 MB
3p-ecosystem/third_party/connectedhomeip/libs/jniLibs/armeabi-v7a/libCHIPController.so
Binary file not shown.
Binary file added
BIN
+183 KB
3p-ecosystem/third_party/connectedhomeip/libs/jniLibs/armeabi-v7a/libSetupPayloadParser.so
Binary file not shown.
Binary file added
BIN
+595 KB
3p-ecosystem/third_party/connectedhomeip/libs/jniLibs/armeabi-v7a/libc++_shared.so
Binary file not shown.
Binary file added
BIN
+30.1 MB
3p-ecosystem/third_party/connectedhomeip/libs/jniLibs/x86/libCHIPController.so
Binary file not shown.
Binary file added
BIN
+373 KB
3p-ecosystem/third_party/connectedhomeip/libs/jniLibs/x86/libSetupPayloadParser.so
Binary file not shown.
Binary file added
BIN
+967 KB
3p-ecosystem/third_party/connectedhomeip/libs/jniLibs/x86/libc++_shared.so
Binary file not shown.
Binary file added
BIN
+26.6 MB
3p-ecosystem/third_party/connectedhomeip/libs/jniLibs/x86_64/libCHIPController.so
Binary file not shown.
Binary file added
BIN
+344 KB
3p-ecosystem/third_party/connectedhomeip/libs/jniLibs/x86_64/libSetupPayloadParser.so
Binary file not shown.
Binary file added
BIN
+1020 KB
3p-ecosystem/third_party/connectedhomeip/libs/jniLibs/x86_64/libc++_shared.so
Binary file not shown.
Oops, something went wrong.