@@ -7,6 +7,10 @@ commissioning mode, advertises itself as a Commissionable Node and gets
7
7
commissioned. Then it allows the user to send Matter ContentLauncher commands to
8
8
the TV.
9
9
10
+ Refer to the
11
+ [ Matter Casting APIs documentation] ( https://project-chip.github.io/connectedhomeip-doc/examples/tv-casting-app/APIs.html )
12
+ to build the Matter “Casting Client” into your consumer-facing mobile app.
13
+
10
14
<hr >
11
15
12
16
- [ Matter TV Casting Android App Example] ( #matter-tv-casting-android-app-example )
@@ -15,6 +19,8 @@ the TV.
15
19
- [ Gradle \& JDK Version] ( #gradle--jdk-version )
16
20
- [ Preparing for build] ( #preparing-for-build )
17
21
- [ Building \& Installing the app] ( #building--installing-the-app )
22
+ - [ Common build environment issues] ( #common-build-environment-issues )
23
+ - [ Running the app] ( #running-the-app )
18
24
19
25
<hr >
20
26
@@ -50,10 +56,24 @@ We are using Gradle 7.1.1 for all android project which does not support Java 17
50
56
(https://docs.gradle.org/current/userguide/compatibility.html ) while the default
51
57
JDK version on MacOS for Apple Silicon is 'openjdk 17.0.1' or above.
52
58
53
- Using JDK bundled with Android Studio will help with that.
59
+ If you attempt to build with an incompatible Java version, you may encounter the
60
+ following error:
61
+
62
+ ``` text
63
+ Unsupported class file major version XX
64
+ ```
65
+
66
+ This error occurs when the Java version being used is not compatible with the
67
+ Gradle version in your project.
68
+
69
+ See the
70
+ [ Building Android] ( ../../../docs/platforms/android/android_building.md#gradle--jdk-version )
71
+ guide for more info about the supported Gradle & JDK Version.
72
+
73
+ You can verify your current Java version by running:
54
74
55
75
``` shell
56
- export JAVA_HOME=/Applications/Android \ Studio.app/Contents/jre/Contents/Home/
76
+ java -version
57
77
```
58
78
59
79
<hr >
@@ -107,3 +127,23 @@ adb install out/android-$TARGET_CPU-tv-casting-app/outputs/apk/debug/app-debug.a
107
127
You can use Android Studio to edit the Android app itself and run it after
108
128
build_examples.py, but you will not be able to edit Matter Android code from
109
129
`src/controller/java`, or other Matter C++ code within Android Studio.
130
+
131
+ ## Common build environment issues
132
+
133
+ 1. If you see an error like `kotlinc: command not found`, install the Kotlin in
134
+ your build environment. Eg. on MacOS, this can be done with the command:
135
+
136
+ ```shell
137
+ brew install kotlin
138
+ ```
139
+
140
+ ## Running the app
141
+
142
+ This example Matter TV Casting Android app can be tested with the following
143
+ video players:
144
+
145
+ 1. With the
146
+ [example Matter tv-app](https://github.com/project-chip/connectedhomeip/tree/master/examples/tv-app)
147
+ running on a Raspberry Pi - works out of the box.
148
+ 2. With a FireTV device - requires your Amazon Customer ID to be allow-listed
149
+ first.
0 commit comments