Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tv-casting-app: simplified android connection API #31617

Merged

Conversation

pgregorr-amazon
Copy link
Contributor

This change implements and demonstrates the use of a simplified Casting Player connection API on Android. This simplified API delegates the work to the common connection implantation in C++ Native.

Change summary

  1. Implemented VerifyOrEstablishConnection() in MatterCastingPlayer.java and the corresponding C++ JNI function in CastingPlayer-JNI.cpp. These delegate to the common implementation for verifying an existing connection or establishing a new connection through the full UDC process.
  2. Provided an example of how to use the simplified connection API in ConnectionExampleFragment.java

Testing
Verified and tested locally with the Android tv-casting-app example app. The example app discovers Casting Players and is able to connect to the selected Casting Player.

Copy link

github-actions bot commented Jan 23, 2024

PR #31617: Size comparison from db7d887 to 313c7a0

Decreases (1 build for efr32)
platform target config section db7d887 313c7a0 change % change
efr32 lighting-app BRD4161A+rs9116 (read/write) 930344 930336 -8 -0.0
.text 731044 731036 -8 -0.0
Full report (73 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, stm32, telink)
platform target config section db7d887 313c7a0 change % change
bl602 lighting-app bl602 (read/write) 1428186 1428186 0 0.0
.bss 85328 85328 0 0.0
.data 9488 9488 0 0.0
.rodata 157324 157324 0 0.0
.text 1095402 1095402 0 0.0
bl602+mfd (read/write) 1442850 1442850 0 0.0
.bss 85496 85496 0 0.0
.data 9456 9456 0 0.0
.rodata 156284 156284 0 0.0
.text 1110968 1110968 0 0.0
bl602+rpc (read/write) 1475930 1475930 0 0.0
.bss 93368 93368 0 0.0
.data 9864 9864 0 0.0
.rodata 164892 164892 0 0.0
.text 1127150 1127150 0 0.0
bl702 lighting-app bl702 (read only) 3478 3478 0 0.0
(read/write) 1193039 1193039 0 0.0
.bss 11133 11133 0 0.0
.data 3664 3664 0 0.0
.rodata 106708 106708 0 0.0
.text 964732 964732 0 0.0
bl702+mfd (read only) 3478 3478 0 0.0
(read/write) 1204119 1204119 0 0.0
.bss 11309 11309 0 0.0
.data 3648 3648 0 0.0
.rodata 105648 105648 0 0.0
.text 976742 976742 0 0.0
bl702+rpc (read only) 3478 3478 0 0.0
(read/write) 1284659 1284659 0 0.0
.bss 19597 19597 0 0.0
.data 4224 4224 0 0.0
.rodata 122080 122080 0 0.0
.text 1039542 1039542 0 0.0
bl706-eth (read/write) 1011621 1011621 0 0.0
.bss 23692 23692 0 0.0
.data 3240 3240 0 0.0
.rodata 100028 100028 0 0.0
.text 756706 756706 0 0.0
bl706-wifi (read/write) 1244582 1244582 0 0.0
.bss 10577 10577 0 0.0
.data 3680 3680 0 0.0
.rodata 121008 121008 0 0.0
.text 986928 986928 0 0.0
bl702l lighting-app bl702l (read only) 512 512 0 0.0
(read/write) 1162420 1162420 0 0.0
.bss 16328 16328 0 0.0
.data 5032 5032 0 0.0
.rodata 100712 100712 0 0.0
.text 957610 957610 0 0.0
bl702l+mfd (read only) 512 512 0 0.0
(read/write) 1173816 1173816 0 0.0
.bss 16504 16504 0 0.0
.data 5008 5008 0 0.0
.rodata 99652 99652 0 0.0
.text 969932 969932 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 (read only) 781320 781320 0 0.0
(read/write) 168864 168864 0 0.0
.bss 90884 90884 0 0.0
.data 3552 3552 0 0.0
.rodata 90312 90312 0 0.0
.text 690744 690744 0 0.0
lock-ftd LP_EM_CC1354P10_6 (read only) 798760 798760 0 0.0
(read/write) 179108 179108 0 0.0
.bss 101068 101068 0 0.0
.data 3580 3580 0 0.0
.rodata 84640 84640 0 0.0
.text 713852 713852 0 0.0
lock-mtd LP_EM_CC1354P10_6 (read only) 787264 787264 0 0.0
(read/write) 173564 173564 0 0.0
.bss 95524 95524 0 0.0
.data 3580 3580 0 0.0
.rodata 111376 111376 0 0.0
.text 675620 675620 0 0.0
pump-app LP_EM_CC1354P10_6 (read only) 738584 738584 0 0.0
(read/write) 167836 167836 0 0.0
.bss 89624 89624 0 0.0
.data 3540 3540 0 0.0
.rodata 86032 86032 0 0.0
.text 652288 652288 0 0.0
pump-controller-app LP_EM_CC1354P10_6 (read only) 724208 724208 0 0.0
(read/write) 168048 168048 0 0.0
.bss 89848 89848 0 0.0
.data 3536 3536 0 0.0
.rodata 81872 81872 0 0.0
.text 642072 642072 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL (read only) 572954 572954 0 0.0
(read/write) 207896 207896 0 0.0
.bss 201180 201180 0 0.0
.data 1592 1592 0 0.0
.rodata 84522 84522 0 0.0
.text 486308 486308 0 0.0
lock CC3235SF_LAUNCHXL (read only) 627218 627218 0 0.0
(read/write) 208296 208296 0 0.0
.bss 201656 201656 0 0.0
.data 1520 1520 0 0.0
.rodata 106386 106386 0 0.0
.text 518712 518712 0 0.0
cyw30739 light cyw930739m2evb_01 (read/write) 564255 564255 0 0.0
.app_xip_area 454177 454177 0 0.0
.bss 64920 64920 0 0.0
.data 732 732 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
lock cyw930739m2evb_01 (read/write) 547903 547903 0 0.0
.app_xip_area 433081 433081 0 0.0
.bss 69624 69624 0 0.0
.data 772 772 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
ota-requestor cyw930739m2evb_01 (read/write) 566071 566071 0 0.0
.app_xip_area 457449 457449 0 0.0
.bss 63504 63504 0 0.0
.data 696 696 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
switch cyw930739m2evb_01 (read/write) 562367 562367 0 0.0
.app_xip_area 450513 450513 0 0.0
.bss 66624 66624 0 0.0
.data 804 804 0 0.0
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A+rs9116 (read/write) 930344 930336 -8 -0.0
.bss 197904 197904 0 0.0
.data 1372 1372 0 0.0
.text 731044 731036 -8 -0.0
BRD4187C (read/write) 1107944 1107944 0 0.0
.bss 195148 195148 0 0.0
.data 3384 3384 0 0.0
.text 909392 909392 0 0.0
lock-app BRD4161A+wf200 (read/write) 1121660 1121660 0 0.0
.bss 188192 188192 0 0.0
.data 2800 2800 0 0.0
.text 930648 930648 0 0.0
window-app BRD4187C (read/write) 1143736 1143736 0 0.0
.bss 167140 167140 0 0.0
.data 3292 3292 0 0.0
.text 973284 973284 0 0.0
esp32 all-clusters-app c3devkit (read only) 1199298 1199298 0 0.0
(read/write) 1744640 1744640 0 0.0
.dram0.bss 73392 73392 0 0.0
.dram0.data 13588 13588 0 0.0
.flash.rodata 248128 248128 0 0.0
.flash.text 1199298 1199298 0 0.0
.iram0.text 75530 75530 0 0.0
m5stack (read only) 1241459 1241459 0 0.0
(read/write) 529600 529600 0 0.0
.dram0.bss 80256 80256 0 0.0
.dram0.data 35132 35132 0 0.0
.flash.rodata 278292 278292 0 0.0
.flash.text 1235295 1235295 0 0.0
.iram0.text 125403 125403 0 0.0
k32w contact k32w0+release (read only) 610488 610488 0 0.0
(read/write) 81332 81332 0 0.0
.bss 69112 69112 0 0.0
.data 2236 2236 0 0.0
.text 609952 609952 0 0.0
k32w1+release (read only) 1024 1024 0 0.0
(read/write) 696180 696180 0 0.0
.bss 67768 67768 0 0.0
.data 2788 2788 0 0.0
.text 582152 582152 0 0.0
light k32w0+release (read only) 598864 598864 0 0.0
(read/write) 79340 79340 0 0.0
.bss 67168 67168 0 0.0
.data 2188 2188 0 0.0
.text 598328 598328 0 0.0
k32w1+release (read only) 1024 1024 0 0.0
(read/write) 787160 787160 0 0.0
.bss 77436 77436 0 0.0
.data 2000 2000 0 0.0
.text 664272 664272 0 0.0
lock k32w0+release (read only) 580152 580152 0 0.0
(read/write) 78756 78756 0 0.0
.bss 66608 66608 0 0.0
.data 2164 2164 0 0.0
.text 579616 579616 0 0.0
linux air-purifier-app debug (read only) 2576573 2576573 0 0.0
(read/write) 127704 127704 0 0.0
.bss 46336 46336 0 0.0
.data 2144 2144 0 0.0
.data.rel.ro 73304 73304 0 0.0
.dynamic 608 608 0 0.0
.got 4552 4552 0 0.0
.init 27 27 0 0.0
.init_array 752 752 0 0.0
.rodata 181512 181512 0 0.0
.text 2218821 2218821 0 0.0
all-clusters-app debug (read only) 5784249 5784249 0 0.0
(read/write) 469168 469168 0 0.0
.bss 132944 132944 0 0.0
.data 4480 4480 0 0.0
.data.rel.ro 324392 324392 0 0.0
.dynamic 624 624 0 0.0
.got 5376 5376 0 0.0
.init 27 27 0 0.0
.init_array 1336 1336 0 0.0
.rodata 341756 341756 0 0.0
.text 5018771 5018771 0 0.0
all-clusters-minimal-app debug (read only) 5125289 5125289 0 0.0
(read/write) 235184 235184 0 0.0
.bss 127280 127280 0 0.0
.data 4384 4384 0 0.0
.data.rel.ro 96456 96456 0 0.0
.dynamic 624 624 0 0.0
.got 5296 5296 0 0.0
.init 27 27 0 0.0
.init_array 1112 1112 0 0.0
.rodata 285421 285421 0 0.0
.text 4606595 4606595 0 0.0
bridge-app debug (read only) 4550825 4550825 0 0.0
(read/write) 216584 216584 0 0.0
.bss 117976 117976 0 0.0
.data 6144 6144 0 0.0
.data.rel.ro 85760 85760 0 0.0
.dynamic 624 624 0 0.0
.got 5264 5264 0 0.0
.init 27 27 0 0.0
.init_array 808 808 0 0.0
.rodata 227221 227221 0 0.0
.text 4104099 4104099 0 0.0
chip-tool debug (read only) 12100473 12100473 0 0.0
(read/write) 516464 516464 0 0.0
.bss 94264 94264 0 0.0
.data 5058 5058 0 0.0
.data.rel.ro 409888 409888 0 0.0
.dynamic 624 624 0 0.0
.got 5784 5784 0 0.0
.init 27 27 0 0.0
.init_array 784 784 0 0.0
.rodata 439769 439769 0 0.0
.text 10954883 10954883 0 0.0
chip-tool-ipv6only arm64 (read only) 11634976 11634976 0 0.0
(read/write) 585200 585200 0 0.0
.bss 103288 103288 0 0.0
.data 4472 4472 0 0.0
.data.rel.ro 449344 449344 0 0.0
.dynamic 512 512 0 0.0
.got 20392 20392 0 0.0
.init 24 24 0 0.0
.init_array 248 248 0 0.0
.rodata 347292 347292 0 0.0
.text 10399852 10399852 0 0.0
lighting-app debug+rpc+ui (read only) 5469849 5469849 0 0.0
(read/write) 225384 225384 0 0.0
.bss 118944 118944 0 0.0
.data 4800 4800 0 0.0
.data.rel.ro 94144 94144 0 0.0
.dynamic 672 672 0 0.0
.got 5880 5880 0 0.0
.init 27 27 0 0.0
.init_array 928 928 0 0.0
.rodata 350964 350964 0 0.0
.text 4873283 4873283 0 0.0
lock-app debug (read only) 4621305 4621305 0 0.0
(read/write) 204112 204112 0 0.0
.bss 113312 113312 0 0.0
.data 4096 4096 0 0.0
.data.rel.ro 79992 79992 0 0.0
.dynamic 624 624 0 0.0
.got 5216 5216 0 0.0
.init 27 27 0 0.0
.init_array 840 840 0 0.0
.rodata 253845 253845 0 0.0
.text 4156499 4156499 0 0.0
ota-provider-app debug (read only) 4259449 4259449 0 0.0
(read/write) 192688 192688 0 0.0
.bss 113248 113248 0 0.0
.data 4256 4256 0 0.0
.data.rel.ro 69312 69312 0 0.0
.dynamic 624 624 0 0.0
.got 4528 4528 0 0.0
.init 27 27 0 0.0
.init_array 712 712 0 0.0
.rodata 206325 206325 0 0.0
.text 3861251 3861251 0 0.0
ota-requestor-app debug (read only) 4375513 4375513 0 0.0
(read/write) 196968 196968 0 0.0
.bss 114144 114144 0 0.0
.data 4656 4656 0 0.0
.data.rel.ro 72288 72288 0 0.0
.dynamic 624 624 0 0.0
.got 4464 4464 0 0.0
.init 27 27 0 0.0
.init_array 768 768 0 0.0
.rodata 212213 212213 0 0.0
.text 3967123 3967123 0 0.0
shell debug (read only) 2864329 2864329 0 0.0
(read/write) 154776 154776 0 0.0
.bss 62248 62248 0 0.0
.data 1344 1344 0 0.0
.data.rel.ro 85416 85416 0 0.0
.dynamic 592 592 0 0.0
.got 4088 4088 0 0.0
.init 27 27 0 0.0
.init_array 1064 1064 0 0.0
.rodata 185696 185696 0 0.0
.text 2506322 2506322 0 0.0
thermostat-no-ble arm64 (read only) 4448056 4448056 0 0.0
(read/write) 247448 247448 0 0.0
.bss 121672 121672 0 0.0
.data 3328 3328 0 0.0
.data.rel.ro 103272 103272 0 0.0
.dynamic 512 512 0 0.0
.got 12160 12160 0 0.0
.init 24 24 0 0.0
.init_array 416 416 0 0.0
.rodata 158348 158348 0 0.0
.text 3945900 3945900 0 0.0
tv-app debug (read only) 5583385 5583385 0 0.0
(read/write) 350384 350384 0 0.0
.bss 243296 243296 0 0.0
.data 6464 6464 0 0.0
.data.rel.ro 93336 93336 0 0.0
.dynamic 624 624 0 0.0
.got 5512 5512 0 0.0
.init 27 27 0 0.0
.init_array 1128 1128 0 0.0
.rodata 284309 284309 0 0.0
.text 5059171 5059171 0 0.0
tv-casting-app debug (read only) 9970225 9970225 0 0.0
(read/write) 342360 342360 0 0.0
.bss 156032 156032 0 0.0
.data 2912 2912 0 0.0
.data.rel.ro 176512 176512 0 0.0
.dynamic 624 624 0 0.0
.got 5088 5088 0 0.0
.init 27 27 0 0.0
.init_array 1168 1168 0 0.0
.rodata 376968 376968 0 0.0
.text 9121347 9121347 0 0.0
mbed lock-app-release cy8cproto_062_4343w (read only) 6224 6224 0 0.0
(read/write) 2531192 2531192 0 0.0
.bss 220392 220392 0 0.0
.data 5208 5208 0 0.0
.text 1493876 1493876 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1095216 1095216 0 0.0
bss 129800 129800 0 0.0
rodata 111280 111280 0 0.0
text 806308 806308 0 0.0
nrf7002dk_nrf5340_cpuapp (read only) 4 4 0 0.0
(read/write) 1215592 1215592 0 0.0
bss 121938 121938 0 0.0
rodata 141132 141132 0 0.0
text 802024 802024 0 0.0
all-clusters-minimal-app nrf52840dk_nrf52840 (read only) 4 4 0 0.0
(read/write) 1044000 1044000 0 0.0
bss 129526 129526 0 0.0
rodata 99136 99136 0 0.0
text 767616 767616 0 0.0
psoc6 all-clusters cy8ckit_062s2_43012 (read only) 835352 835352 0 0.0
(read/write) 1791868 1791868 0 0.0
.bss 195348 195348 0 0.0
.data 2640 2640 0 0.0
.text 1585492 1585492 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 (read only) 837656 837656 0 0.0
(read/write) 1713404 1713404 0 0.0
.bss 193068 193068 0 0.0
.data 2616 2616 0 0.0
.text 1509332 1509332 0 0.0
light cy8ckit_062s2_43012 (read only) 844352 844352 0 0.0
(read/write) 1636412 1636412 0 0.0
.bss 186556 186556 0 0.0
.data 2432 2432 0 0.0
.text 1439036 1439036 0 0.0
lock cy8ckit_062s2_43012 (read only) 817232 817232 0 0.0
(read/write) 1665716 1665716 0 0.0
.bss 213652 213652 0 0.0
.data 2456 2456 0 0.0
.text 1441220 1441220 0 0.0
qpg lighting-app qpg6105+debug (read/write) 1121856 1121856 0 0.0
.bss 102224 102224 0 0.0
.data 808 808 0 0.0
.text 634236 634236 0 0.0
lock-app qpg6105+debug (read/write) 1086120 1086120 0 0.0
.bss 98528 98528 0 0.0
.data 852 852 0 0.0
.text 598496 598496 0 0.0
stm32 light STM32WB5MM-DK (read/write) 597517 597517 0 0.0
.bss 128280 128280 0 0.0
.data 660 660 0 0.0
.rodata 78756 78756 0 0.0
.text 380096 380096 0 0.0
telink air-quality-sensor-app tlsr9528a_retention (read only) 51774 51774 0 0.0
(read/write) 825622 825622 0 0.0
bss 51020 51020 0 0.0
text 617574 617574 0 0.0
all-clusters-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 1113932 1113932 0 0.0
bss 100784 100784 0 0.0
text 788662 788662 0 0.0
all-clusters-minimal-app tlsr9528a (read only) 4 4 0 0.0
(read/write) 1090448 1090448 0 0.0
bss 109920 109920 0 0.0
text 758924 758924 0 0.0
bridge-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 935876 935876 0 0.0
bss 92988 92988 0 0.0
text 649670 649670 0 0.0
contact-sensor-app tlsr9528a_retention (read only) 51774 51774 0 0.0
(read/write) 827514 827514 0 0.0
bss 51072 51072 0 0.0
text 619532 619532 0 0.0
light-switch-app-ota-shell-factory-data tlsr9528a (read only) 4 4 0 0.0
(read/write) 985448 985448 0 0.0
bss 79116 79116 0 0.0
text 700238 700238 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 1097868 1097868 0 0.0
bss 100064 100064 0 0.0
text 773896 773896 0 0.0
lock-app-dfu tlsr9528a (read only) 4 4 0 0.0
(read/write) 971392 971392 0 0.0
bss 97416 97416 0 0.0
text 653438 653438 0 0.0
ota-requestor-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 953684 953684 0 0.0
bss 92564 92564 0 0.0
text 667588 667588 0 0.0
pump-app tlsr9528a (read only) 4 4 0 0.0
(read/write) 884760 884760 0 0.0
bss 69136 69136 0 0.0
text 626064 626064 0 0.0
pump-controller-app tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 825412 825412 0 0.0
bss 57380 57380 0 0.0
text 592988 592988 0 0.0
shell tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 705772 705772 0 0.0
bss 73640 73640 0 0.0
text 462164 462164 0 0.0
smoke_co_alarm-app tlsr9528a_retention (read only) 51774 51774 0 0.0
(read/write) 829266 829266 0 0.0
bss 51200 51200 0 0.0
text 622302 622302 0 0.0
temperature-measurement-app-mars-ota tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 884025 884025 0 0.0
bss 60856 60856 0 0.0
text 636092 636092 0 0.0
thermostat tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 851728 851728 0 0.0
bss 57668 57668 0 0.0
text 613284 613284 0 0.0
window-covering tlsr9518adk80d (read only) 4 4 0 0.0
(read/write) 844480 844480 0 0.0
bss 57984 57984 0 0.0
text 605910 605910 0 0.0

Copy link
Contributor

@yunhanw-google yunhanw-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you address the above comment, thanks

@yunhanw-google yunhanw-google enabled auto-merge (squash) January 26, 2024 22:50
auto-merge was automatically disabled January 26, 2024 22:54

Head branch was pushed to by a user without write access

@sharadb-amazon sharadb-amazon enabled auto-merge (squash) January 27, 2024 00:13
@sharadb-amazon sharadb-amazon merged commit e03a83c into project-chip:master Jan 27, 2024
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants