diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index bbda0aeef..66239acd0 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -108,7 +108,39 @@ + android:exported="true" + android:theme="@style/AppTheme.NoActionBar"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + { Intent intent = result.getData(); @@ -165,11 +171,11 @@ public class ImportExportActivity extends CatimaAppCompatActivity { // Check that there is a file manager available Button importFilesystem = binding.importOptionFilesystemButton; - importFilesystem.setOnClickListener(v -> chooseImportType(false)); + importFilesystem.setOnClickListener(v -> chooseImportType(false, null)); // Check that there is an app that data can be imported from Button importApplication = binding.importOptionApplicationButton; - importApplication.setOnClickListener(v -> chooseImportType(true)); + importApplication.setOnClickListener(v -> chooseImportType(true, null)); } private void openFileForImport(Uri uri, char[] password) { @@ -183,7 +189,9 @@ public class ImportExportActivity extends CatimaAppCompatActivity { } } - private void chooseImportType(boolean choosePicker) { + private void chooseImportType(boolean choosePicker, + @Nullable Uri fileData) { + List betaImportOptions = new ArrayList<>(); betaImportOptions.add("Fidme"); betaImportOptions.add("Stocard"); @@ -235,6 +243,11 @@ public class ImportExportActivity extends CatimaAppCompatActivity { throw new IllegalArgumentException("Unknown DataFormat"); } + if (fileData != null) { + openFileForImport(fileData, null); + return; + } + new MaterialAlertDialogBuilder(this) .setTitle(importAlertTitle) .setMessage(importAlertMessage) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 3ccdeb2f1..c412be587 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -303,6 +303,7 @@ View archive (%1$d cards) Welcome to Catima + Import cards How much did you spend? Enter amount Current balance: %s