diff --git a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/AddAccountDialog.kt b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/AddAccountDialog.kt index 49c0cd8f..adf4e3ed 100644 --- a/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/AddAccountDialog.kt +++ b/fints4javaAndroidApp/src/main/java/net/dankito/banking/fints4java/android/ui/dialogs/AddAccountDialog.kt @@ -183,6 +183,21 @@ open class AddAccountDialog : DialogFragment() { edtxtBankCode.clearListSelection() checkIfRequiredDataEnteredOnUiThread() + + if (bank.supportsFinTs3_0 == false) { + showBankDoesNotSupportFinTs30ErrorMessage(bank) + } + } + + private fun showBankDoesNotSupportFinTs30ErrorMessage(bank: BankInfo) { + activity?.let { context -> + val errorMessage = context.getString(R.string.dialog_add_account_bank_does_not_support_fints_3_error_message, bank.name) + + AlertDialog.Builder(context) + .setMessage(errorMessage) + .setPositiveButton(android.R.string.ok) { dialog, _ -> dialog.dismiss() } + .show() + } } protected open fun checkIfRequiredDataEnteredOnUiThread() { diff --git a/fints4javaAndroidApp/src/main/res/values/strings.xml b/fints4javaAndroidApp/src/main/res/values/strings.xml index c31f468f..f14db977 100644 --- a/fints4javaAndroidApp/src/main/res/values/strings.xml +++ b/fints4javaAndroidApp/src/main/res/values/strings.xml @@ -29,6 +29,7 @@ Customer Id: Pin: Add + %s does not support FinTS 3.0 and therefore cannot be used in this application. Could not add account: %s Successfully added account.