diff --git a/app/src/main/java/no/nordicsemi/memfault/home/HomeScreen.kt b/app/src/main/java/no/nordicsemi/memfault/home/HomeScreen.kt
index b162faa..f6ca29c 100644
--- a/app/src/main/java/no/nordicsemi/memfault/home/HomeScreen.kt
+++ b/app/src/main/java/no/nordicsemi/memfault/home/HomeScreen.kt
@@ -65,6 +65,7 @@ import androidx.compose.ui.text.LinkAnnotation
import androidx.compose.ui.text.SpanStyle
import androidx.compose.ui.text.TextLinkStyles
import androidx.compose.ui.text.buildAnnotatedString
+import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.withLink
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
@@ -127,6 +128,9 @@ private fun OnePane(
Spacer(modifier = Modifier.weight(0.3f))
Content(
+ modifier = Modifier
+ .padding(horizontal = 16.dp)
+ .widthIn(max = 600.dp),
onStart = onStart
)
@@ -153,7 +157,9 @@ private fun TwoPane(
modifier = Modifier
.weight(0.7f)
.verticalScroll(rememberScrollState())
- .padding(vertical = 16.dp),
+ .padding(vertical = 16.dp)
+ .padding(end = 16.dp)
+ .widthIn(max = 600.dp),
onStart = onStart
)
}
@@ -181,6 +187,14 @@ private fun Content(
modifier = modifier,
horizontalAlignment = Alignment.CenterHorizontally,
) {
+ Text(
+ text = stringResource(R.string.app_info_header),
+ style = MaterialTheme.typography.titleLarge,
+ textAlign = TextAlign.Center,
+ )
+
+ Spacer(modifier = Modifier.size(32.dp))
+
Text(
text = buildAnnotatedString {
append(stringResource(id = R.string.app_info))
@@ -197,7 +211,7 @@ private fun Content(
append(" ")
withLink(
LinkAnnotation.Url(
- url = "https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/bluetooth/services/mds.html",
+ url = "https://docs.memfault.com/docs/mcu/mds",
styles = TextLinkStyles(style = SpanStyle(color = MaterialTheme.colorScheme.secondary)),
)
) {
@@ -206,9 +220,6 @@ private fun Content(
append(stringResource(id = R.string.app_info_3))
},
style = MaterialTheme.typography.bodyLarge,
- modifier = Modifier
- .widthIn(max = 600.dp)
- .padding(horizontal = 16.dp)
)
Spacer(modifier = Modifier.size(32.dp))
@@ -223,7 +234,10 @@ private fun Content(
@Composable
private fun OnePanePreview() {
OnePane(
- modifier = Modifier.fillMaxSize(),
+ modifier = Modifier
+ .fillMaxSize()
+ .padding(vertical = 16.dp)
+ .widthIn(max = 600.dp),
onStart = { }
)
}
@@ -232,7 +246,10 @@ private fun OnePanePreview() {
@Composable
private fun TwoPanePreview() {
TwoPane(
- modifier = Modifier.fillMaxSize(),
+ modifier = Modifier
+ .fillMaxSize()
+ .padding(vertical = 16.dp)
+ .widthIn(max = 600.dp),
onStart = { }
)
}
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index f270d94..e4f02d3 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -77,10 +77,10 @@
#%d
%d bytes
- nRF Memfault forwards diagnostic data collected by firmware through a
- Bluetooth LE gateway to the
+ Fix defects before your customers find them.
+ nRF Memfault app forwards diagnostic data collected from embedded device using Bluetooth LE to
Memfault console
.\n\nThe device should support
- Memfault Diagnostics Service (MDS)
+ Memfault Monitoring & Diagnostics Service (MDS)
.
\ No newline at end of file
diff --git a/lib/observability/src/main/java/no/nordicsemi/memfault/observability/MemfaultDiagnosticsManager.kt b/lib/observability/src/main/java/no/nordicsemi/memfault/observability/MemfaultDiagnosticsManager.kt
index dab9f7c..2ecd3a4 100644
--- a/lib/observability/src/main/java/no/nordicsemi/memfault/observability/MemfaultDiagnosticsManager.kt
+++ b/lib/observability/src/main/java/no/nordicsemi/memfault/observability/MemfaultDiagnosticsManager.kt
@@ -43,14 +43,14 @@ import no.nordicsemi.memfault.observability.internal.MemfaultScope
/**
* Class responsible for managing connection with the remote IoT device which supports
- * Memfault Diagnostic Service.
+ * Memfault Monitoring & Diagnostic Service.
*
* The manager connects to the device and uploads all downloaded chunks to the cloud.
*
* Data can be emitted any time so the connection should be maintained as long as needed.
*
* @see Memfault console
- * @see Memfault Diagnostic GATT Service
+ * @see Memfault Monitoring & Diagnostic GATT Service
*/
interface MemfaultDiagnosticsManager {
diff --git a/lib/observability/src/main/java/no/nordicsemi/memfault/observability/bluetooth/MemfaultDiagnosticsService.kt b/lib/observability/src/main/java/no/nordicsemi/memfault/observability/bluetooth/MemfaultDiagnosticsService.kt
index 1ec5443..803ea33 100644
--- a/lib/observability/src/main/java/no/nordicsemi/memfault/observability/bluetooth/MemfaultDiagnosticsService.kt
+++ b/lib/observability/src/main/java/no/nordicsemi/memfault/observability/bluetooth/MemfaultDiagnosticsService.kt
@@ -73,7 +73,7 @@ import kotlin.uuid.ExperimentalUuidApi
import kotlin.uuid.Uuid
/**
- * Memfault Diagnostics Service UUID.
+ * Memfault Monitoring & Diagnostics Service UUID.
*
* Find specification ih the [Documentation](https://docs.memfault.com/docs/mcu/mds).
*/
@@ -86,7 +86,8 @@ private val MDS_AUTHORISATION_CHARACTERISTIC_UUID = Uuid.parse("54220004-f6
private val MDS_DATA_EXPORT_CHARACTERISTIC_UUID = Uuid.parse("54220005-f6a5-4007-a371-722f4ebd8436")
/**
- * A client implementation of Memfault Diagnostics Service (MDS) that streams data from the device.
+ * A client implementation of Memfault Monitoring & Diagnostics Service (MDS) that streams data
+ * from the device.
*
* This class connects to the device, discovers the MDS service, reads the configuration,
* and streams diagnostics [chunks] from the device.
@@ -251,7 +252,7 @@ class MemfaultDiagnosticsService {
// We may ignore it, as the observer already notified about the disconnection.
is ConnectionState.Closed -> return@onEach
- // Disconnected state is emitted when the connection is lost when the device
+ // Disconnected state is emitted when the connection is lost, when the device
// is not supported (disconnect() method called), or the connection was cancelled
// by the user.
is ConnectionState.Disconnected -> {
@@ -316,7 +317,7 @@ class MemfaultDiagnosticsService {
// Check if the MDS service is supported.
// The exception will be caught in the catch block below.
- checkNotNull(mds) { "Memfault Diagnostics Service not supported" }
+ checkNotNull(mds) { "Monitoring & Diagnostics Service not supported" }
_state.emit(value = DeviceState.Initializing)
@@ -328,7 +329,7 @@ class MemfaultDiagnosticsService {
// Make sure the chunks are enabled only after the state changed to Connected.
start(mds)
- logger.info("Memfault Diagnostics Service started successfully")
+ logger.info("Monitoring & Diagnostics Service started successfully")
}
.catch { throwable ->
logger.error(throwable.message)