From 8947c82c6d428549391302d6361acbb14c5ecaff Mon Sep 17 00:00:00 2001 From: himalia416 Date: Tue, 7 Oct 2025 10:06:21 +0200 Subject: [PATCH] Added DFU in the homepage --- .../android/nrftoolbox/view/HomeView.kt | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/no/nordicsemi/android/nrftoolbox/view/HomeView.kt b/app/src/main/java/no/nordicsemi/android/nrftoolbox/view/HomeView.kt index 11f1df92..92276c7b 100644 --- a/app/src/main/java/no/nordicsemi/android/nrftoolbox/view/HomeView.kt +++ b/app/src/main/java/no/nordicsemi/android/nrftoolbox/view/HomeView.kt @@ -315,8 +315,26 @@ internal fun HomeView() { ) } - else -> { - // TODO: Add more profiles + Profile.DFU -> { + FeatureButton( + iconId = R.drawable.ic_dfu, + description = R.string.dfu_module_full, + deviceName = peripheral.name, + deviceAddress = peripheral.address, + profileNames = services.map { it.profile.toString() }, + onClick = { + onEvent( + UiEvent.OnDeviceClick( + peripheral.address, + serviceManager.profile + ) + ) + }, + ) + } + + Profile.BATTERY -> { + // Battery service is handled above, do nothing here. } } }