Skip to content

Commit b88be43

Browse files
Doc updates, renamed a function
1 parent 7a2d846 commit b88be43

7 files changed

+26
-7
lines changed

examples/tv-casting-app/APIs.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ func startDiscovery() {
688688
}
689689
```
690690

691-
Note: You will need to connect with a Casting Player as described below to see
691+
Note: You will need to connect with a Casting Player as described below to se
692692
the list of Endpoints that they support. Refer to the
693693
[Connection](#connect-to-a-casting-player) section for details on how to
694694
discover available endpoints supported by a Casting Player.
@@ -864,7 +864,7 @@ On Android, it can select an `Endpoint` as shown below.
864864
```java
865865
private static final Integer SAMPLE_ENDPOINT_VID = 65521;
866866
867-
private Endpoint selectEndpoint()
867+
private Endpoint selectFirstEndpointByVID()
868868
{
869869
Endpoint endpoint = null;
870870
if(selectedCastingPlayer != null)

examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/util/GlobalCastingConstants.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ public class GlobalCastingConstants {
66
public static final int SetupPasscode = 20202021;
77
public static final int Discriminator = 0xF00;
88
public static final boolean ChipCastingSimplified =
9-
true; // set this flag to true to demo simplified casting APIs
9+
true; // set to true, to demo the simplified casting APIs. Otherwise, the older deprecated
10+
// APIs are invoked
1011
}

examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ApplicationBasicReadVendorIDExampleFragment.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ public View onCreateView(
6868
LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
6969
this.readButtonClickListener =
7070
v -> {
71-
Endpoint endpoint = EndpointSelectorExample.selectEndpointByVID(selectedCastingPlayer);
71+
Endpoint endpoint =
72+
EndpointSelectorExample.selectFirstEndpointByVID(selectedCastingPlayer);
7273
if (endpoint == null) {
7374
Log.e(TAG, "No Endpoint with sample vendorID found on CastingPlayer");
7475
return;

examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ContentLauncherLaunchURLExampleFragment.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ public View onCreateView(
6868
LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
6969
this.launchUrlButtonClickListener =
7070
v -> {
71-
Endpoint endpoint = EndpointSelectorExample.selectEndpointByVID(selectedCastingPlayer);
71+
Endpoint endpoint =
72+
EndpointSelectorExample.selectFirstEndpointByVID(selectedCastingPlayer);
7273
if (endpoint == null) {
7374
Log.e(TAG, "No Endpoint with sample vendorID found on CastingPlayer");
7475
return;

examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/EndpointSelectorExample.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ public class EndpointSelectorExample {
1010
private static final String TAG = EndpointSelectorExample.class.getSimpleName();
1111
private static final Integer SAMPLE_ENDPOINT_VID = 65521;
1212

13-
public static Endpoint selectEndpointByVID(CastingPlayer selectedCastingPlayer) {
13+
/**
14+
* Returns the first Endpoint in the list of Endpoints associated with the selectedCastingPlayer
15+
* whose VendorID matches the EndpointSelectorExample.SAMPLE_ENDPOINT_VID
16+
*/
17+
public static Endpoint selectFirstEndpointByVID(CastingPlayer selectedCastingPlayer) {
1418
Endpoint endpoint = null;
1519
if (selectedCastingPlayer != null) {
1620
List<Endpoint> endpoints = selectedCastingPlayer.getEndpoints();

examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/MediaPlaybackSubscribeToCurrentStateExampleFragment.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public void onCreate(Bundle savedInstanceState) {
7070
@Override
7171
public View onCreateView(
7272
LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
73-
Endpoint endpoint = EndpointSelectorExample.selectEndpointByVID(selectedCastingPlayer);
73+
Endpoint endpoint = EndpointSelectorExample.selectFirstEndpointByVID(selectedCastingPlayer);
7474
if (endpoint == null) {
7575
Log.e(TAG, "No Endpoint with sample vendorID found on CastingPlayer");
7676
return inflater.inflate(

examples/tv-casting-app/android/README.md

+12
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,18 @@ Complete the following steps to prepare the Matter build:
7070
source scripts/bootstrap.sh
7171
```
7272

73+
3. The build will produce libraries: AndroidPlatform.jar, CHIPAppServer.jar,
74+
CHIPInteractionModel.jar and TVCastingApp.jar in [App/app/libs](App/app/libs)
75+
and libTvCastingApp.so and libc++\_shared.so in
76+
[App/app/libs/jniLibs/](App/app/libs/jniLibs/) consumed by any casting app to
77+
leverage the [casting APIs](../APIs.md), like the sample android
78+
tv-casting-app. If building for your own casting app, make sure your client's
79+
specific values are set for `CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID` and
80+
`CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID` in the
81+
[CHIPProjectAppConfig.h](tv-casting-common/include/CHIPProjectAppConfig.h)
82+
file, before the build. Other values like the
83+
`CHIP_DEVICE_CONFIG_DEVICE_NAME` may be optionally updated as well.
84+
7385
## Building & Installing the app
7486
7587
This is the simplest option. In the command line, run the following command from

0 commit comments

Comments
 (0)