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

[android] Exit to the main screen after commissioning #9371

Merged
merged 3 commits into from
Sep 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions docs/guides/nrfconnect_android_commissioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,22 +185,23 @@ device successfully joins the Thread network.

## Sending CHIP commands

Once the device is commissioned, the following screen appears:
Once the device is commissioned, the main application screen appears.

![CHIPTool device control screen](./images/CHIPTool_device_commissioned.jpg)
Check the IPv6 connectivity with the device using the following steps:

The two textboxes at the top contain **Fabric ID** and **Node ID** of the last
commissioned device.
1. Tap **LIGHT ON/OFF & LEVEL CLUSTER**. The following screen appears:

Check the IPv6 connectivity with the device using the following steps:
![CHIPTool device control screen](./images/CHIPTool_device_commissioned.jpg)

1. Tap **UPDATE ADDRESS** to learn or refresh the IPv6 address of the device.
The two textboxes at the top contain **Fabric ID** and **Node ID** of the
last commissioned device.

2. Tap **UPDATE ADDRESS** to learn or refresh the IPv6 address of the device.
CHIPTool will use a built-in DNS-SD client to resolve **Fabric ID** and
**Node ID** of the device to its IPv6 address. The result of the operation,
be it the address or an error message, will be displayed at the bottom of the
screen.

2. Tap the following buttons to change the lock state of the nRF Connect door
3. Tap the following buttons to change the lock state of the nRF Connect door
lock example application referenced in this guide:

- **ON** and **OFF** buttons lock and unlock the door, respectively.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,14 @@ class CHIPToolActivity :
}

override fun onCommissioningComplete(code: Int) {
ChipClient.getDeviceController(this).close()
if (code == 0) {
showFragment(OnOffClientFragment.newInstance(), false)
} else {
showFragment(SelectActionFragment.newInstance(), false)
runOnUiThread {
Toast.makeText(
this,
getString(R.string.commissioning_completed, code),
Toast.LENGTH_SHORT).show()
}
ChipClient.getDeviceController(this).close()
showFragment(SelectActionFragment.newInstance(), false)
Damian-Nordic marked this conversation as resolved.
Show resolved Hide resolved
}

override fun handleScanQrCodeClicked() {
Expand Down
1 change: 1 addition & 0 deletions src/android/CHIPTool/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
<string name="rendezvous_over_ble_pairing_failure_text">Pairing failed</string>
<string name="rendezvous_over_ble_commissioning_success_text">Network commissioning completed</string>
<string name="rendezvous_over_ble_commissioning_failure_text">Network commissioning failed</string>
<string name="commissioning_completed">Commissioning completed with result: %1$d</string>

<string name="attestation_test_btn_text">Attestation Test</string>
<string name="attestation_fetching_status">Fetching…</string>
Expand Down