Skip to content

Commit 06f638d

Browse files
Loading CHIPController manually from MatterEndpoint.java
1 parent 633888e commit 06f638d

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/core/CastingApp.java

-2
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,6 @@ public MatterError stop() {
158158
private native MatterError finishStartup();
159159

160160
static {
161-
//System.loadLibrary("CHIPController");
162-
//System.out.println("CHIPController loaded");
163161
System.loadLibrary("TvCastingApp");
164162
System.out.println("TvCastingApp loaded");
165163
}

examples/tv-casting-app/android/App/app/src/main/jni/com/matter/casting/core/MatterEndpoint.java

+6
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,13 @@ public void testGetCluster()
9191
try {
9292
Long deviceProxy = deviceProxyFuture.get(5, TimeUnit.SECONDS);
9393
Log.d(TAG, "getDeviceProxy returned value " + deviceProxy);
94+
95+
System.out.println("CHIPController loading");
96+
System.loadLibrary("CHIPController");
97+
System.out.println("CHIPController loaded");
98+
9499
ChipClusters.ContentLauncherCluster cluster = new ChipClusters.ContentLauncherCluster(deviceProxy, getId());
100+
Log.d(TAG, "Content launcher cluster created " + cluster);
95101
cluster.launchURL(new ChipClusters.ContentLauncherCluster.LauncherResponseCallback() {
96102
@Override
97103
public void onSuccess(Integer status, Optional<String> data) {

examples/tv-casting-app/android/BUILD.gn

+2
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ android_library("java") {
8181
":android",
8282
"${chip_root}/src/app/server/java",
8383
"${chip_root}/src/controller/java",
84+
"${chip_root}/src/controller/java:java",
8485
"${chip_root}/src/platform/android:java",
8586
"${chip_root}/third_party/android_deps:annotation",
8687
]
@@ -153,6 +154,7 @@ group("default") {
153154
":jni",
154155
"${chip_root}/src/app/server/java",
155156
"${chip_root}/src/controller/java",
157+
"${chip_root}/src/controller/java:java",
156158
"${chip_root}/src/platform/android:java",
157159
]
158160
}

0 commit comments

Comments
 (0)