Skip to content

Commit

Permalink
Printing version code in the app
Browse files Browse the repository at this point in the history
  • Loading branch information
philips77 committed Dec 19, 2022
1 parent 44780e7 commit 39cd896
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ import androidx.compose.ui.unit.dp
import androidx.hilt.navigation.compose.hiltViewModel
import no.nordicsemi.android.common.analytics.view.AnalyticsPermissionSwitch
import no.nordicsemi.android.common.theme.view.NordicAppBar
import no.nordicsemi.android.dfu.BuildConfig.VERSION_CODE
import no.nordicsemi.android.dfu.BuildConfig.VERSION_NAME
import no.nordicsemi.android.dfu.profile.settings.R
import no.nordicsemi.android.dfu.profile.settings.viewmodel.SettingsViewModel
Expand Down Expand Up @@ -182,7 +183,7 @@ internal fun SettingsScreen() {
AnalyticsPermissionSwitch()

Text(
text = stringResource(id = R.string.dfu_version, VERSION_NAME),
text = stringResource(id = R.string.dfu_version, VERSION_NAME, VERSION_CODE),
modifier = Modifier.fillMaxWidth(),
style = MaterialTheme.typography.labelMedium,
color = LocalContentColor.current.copy(alpha = 0.38f),
Expand Down
2 changes: 1 addition & 1 deletion profile/settings/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@
<string name="dfu_about_app">About the app</string>
<string name="dfu_about_dfu">About DFU</string>
<string name="dfu_about_dfu_desc">DFU documentation on Nordic\'s Infocenter.</string>
<string name="dfu_version">Version: %s</string>
<string name="dfu_version">Version: %s (build %s)</string>
</resources>

0 comments on commit 39cd896

Please sign in to comment.