diff --git a/wallet/src/main/java/com/android/identity_credential/wallet/ui/destination/settings/SettingsScreen.kt b/wallet/src/main/java/com/android/identity_credential/wallet/ui/destination/settings/SettingsScreen.kt index 828024da0..de98a048f 100644 --- a/wallet/src/main/java/com/android/identity_credential/wallet/ui/destination/settings/SettingsScreen.kt +++ b/wallet/src/main/java/com/android/identity_credential/wallet/ui/destination/settings/SettingsScreen.kt @@ -40,6 +40,7 @@ import androidx.compose.ui.unit.dp import com.android.identity.document.DocumentStore import com.android.identity_credential.wallet.R import com.android.identity_credential.wallet.SettingsModel +import com.android.identity_credential.wallet.WalletApplication import com.android.identity_credential.wallet.WalletApplicationConfiguration import com.android.identity_credential.wallet.navigation.WalletDestination import com.android.identity_credential.wallet.ui.ScreenWithAppBarAndBackButton @@ -235,6 +236,18 @@ fun SettingsScreen( onClicked = { showMinServerUrlDialog = true } ) } + if (settingsModel.developerModeEnabled.value == true) { + SettingSectionSubtitle(title = stringResource(R.string.settings_screen_debug_actions_section)) + val context = LocalContext.current + val walletApplication = context.applicationContext as WalletApplication + Button( + onClick = { + walletApplication.documentModel.periodicSyncForAllDocuments() + } + ) { + Text(text = stringResource(R.string.settings_screen_trigger_periodic_sync_button)) + } + } } } } diff --git a/wallet/src/main/res/values/strings.xml b/wallet/src/main/res/values/strings.xml index e283893a1..f524996f6 100644 --- a/wallet/src/main/res/values/strings.xml +++ b/wallet/src/main/res/values/strings.xml @@ -566,4 +566,6 @@ Bluetooth must be enabled to share a QR connection code Enable No available documents can fulfill the request. + Debug actions + Trigger Periodic Sync