diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 0000000..ca40e33 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,39 @@ +--- +name: Bug Report +about: Create a report to help us improve +title: "[BR] " +labels: bug +assignees: '' + +--- + +**Before Submitting, be sure to** +- [ ] Update to the latest stable version. +- [ ] Read and follow the guides described in the [documentation](https://docs.regulaforensics.com?utm_source=github). +- [ ] Try to reproduce in our demo project. +- [ ] Search for your issue in the existing GitHub issues. + +**Bug Description** + + +**Steps To Reproduce** + + +**Expected behavior** + + +**Screenshots** + + +**Environment:** + - Device: + - OS: + - OS version: + +**Additional context** + diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index bc25558..bb2ed0f 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,5 +1,5 @@ blank_issues_enabled: false contact_links: - - name: Submit a request + - name: Regula Help Center url: https://support.regulaforensics.com/hc/requests/new?utm_source=github - about: Submit any requests to Regula Support Team + about: Please submit any requests here diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md new file mode 100644 index 0000000..0518174 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -0,0 +1,20 @@ +--- +name: Feature Request +about: Suggest an idea for this product +title: "[FR] " +labels: enhancement +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** + + +**Describe the solution you'd like** + + +**Describe alternatives you've considered** + + +**Additional context** + diff --git a/.vscode/launch.json b/.vscode/launch.json index 1f847ab..8dc7181 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,10 +2,10 @@ "version": "0.2.0", "configurations": [ { - "name": "C#: DocumentReaderSample", + "name": "Run", "type": "dotnet", "request": "launch", - "projectPath": "${workspaceFolder}/DocumentReaderSample/DocumentReaderSample.csproj", + "projectPath": "${workspaceFolder}/DocumentReaderSample.csproj", "launchConfigurationId": "vscode-maui" } ] diff --git a/DocumentReaderSample/App.xaml b/App.xaml similarity index 100% rename from DocumentReaderSample/App.xaml rename to App.xaml diff --git a/DocumentReaderSample/App.xaml.cs b/App.xaml.cs similarity index 100% rename from DocumentReaderSample/App.xaml.cs rename to App.xaml.cs diff --git a/DocumentReaderSample/AppShell.xaml b/AppShell.xaml similarity index 100% rename from DocumentReaderSample/AppShell.xaml rename to AppShell.xaml diff --git a/DocumentReaderSample/AppShell.xaml.cs b/AppShell.xaml.cs similarity index 100% rename from DocumentReaderSample/AppShell.xaml.cs rename to AppShell.xaml.cs diff --git a/DocumentReaderSample/DocumentReaderSample.csproj b/DocumentReaderSample.csproj similarity index 97% rename from DocumentReaderSample/DocumentReaderSample.csproj rename to DocumentReaderSample.csproj index d0beedb..2c5dc85 100644 --- a/DocumentReaderSample/DocumentReaderSample.csproj +++ b/DocumentReaderSample.csproj @@ -35,12 +35,12 @@ - + - + diff --git a/DocumentReaderSample.sln b/DocumentReaderSample.sln index cc68f22..b7dd167 100644 --- a/DocumentReaderSample.sln +++ b/DocumentReaderSample.sln @@ -1,27 +1,25 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 17.0.31611.283 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DocumentReaderSample", "DocumentReaderSample\DocumentReaderSample.csproj", "{BB066DA3-F2F3-4471-99FD-513C5D97AE91}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {BB066DA3-F2F3-4471-99FD-513C5D97AE91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BB066DA3-F2F3-4471-99FD-513C5D97AE91}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BB066DA3-F2F3-4471-99FD-513C5D97AE91}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {BB066DA3-F2F3-4471-99FD-513C5D97AE91}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BB066DA3-F2F3-4471-99FD-513C5D97AE91}.Release|Any CPU.Build.0 = Release|Any CPU - {BB066DA3-F2F3-4471-99FD-513C5D97AE91}.Release|Any CPU.Deploy.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572} - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.5.002.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DocumentReaderSample", "DocumentReaderSample.csproj", "{7EEC243F-F741-42C9-A939-8D0EECE5EABB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7EEC243F-F741-42C9-A939-8D0EECE5EABB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7EEC243F-F741-42C9-A939-8D0EECE5EABB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7EEC243F-F741-42C9-A939-8D0EECE5EABB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7EEC243F-F741-42C9-A939-8D0EECE5EABB}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {AEA7EA88-F65D-4B78-9C3D-D3CFE424BCDC} + EndGlobalSection +EndGlobal diff --git a/DocumentReaderSample/IDocReaderInit.cs b/IDocReaderInit.cs similarity index 100% rename from DocumentReaderSample/IDocReaderInit.cs rename to IDocReaderInit.cs diff --git a/DocumentReaderSample/IDocReaderScanner.cs b/IDocReaderScanner.cs similarity index 100% rename from DocumentReaderSample/IDocReaderScanner.cs rename to IDocReaderScanner.cs diff --git a/DocumentReaderSample/IPhotoPickerService.cs b/IPhotoPickerService.cs similarity index 100% rename from DocumentReaderSample/IPhotoPickerService.cs rename to IPhotoPickerService.cs diff --git a/DocumentReaderSample/MainPage.xaml b/MainPage.xaml similarity index 100% rename from DocumentReaderSample/MainPage.xaml rename to MainPage.xaml diff --git a/DocumentReaderSample/MainPage.xaml.cs b/MainPage.xaml.cs similarity index 93% rename from DocumentReaderSample/MainPage.xaml.cs rename to MainPage.xaml.cs index b905eb0..1046bf0 100644 --- a/DocumentReaderSample/MainPage.xaml.cs +++ b/MainPage.xaml.cs @@ -11,6 +11,13 @@ public MainPage() Application.Current.UserAppTheme = AppTheme.Light; Application.Current.RequestedThemeChanged += (s, a) => { Application.Current.UserAppTheme = AppTheme.Light; }; + // Fix disappearing selection in iOS + Loaded += (object sender, EventArgs e) => + { + if (Scenarios.Count > 0) + ScenariosListView.UpdateSelectedItems([ScenariosListView.SelectedItem]); + }; + docReaderScanner = DependencyService.Get(); docReaderScanner.ResultsObtained += (object s, IDocReaderScannerEvent e) => { diff --git a/DocumentReaderSample/MauiProgram.cs b/MauiProgram.cs similarity index 100% rename from DocumentReaderSample/MauiProgram.cs rename to MauiProgram.cs diff --git a/DocumentReaderSample/Platforms/Android/AndroidManifest.xml b/Platforms/Android/AndroidManifest.xml similarity index 100% rename from DocumentReaderSample/Platforms/Android/AndroidManifest.xml rename to Platforms/Android/AndroidManifest.xml diff --git a/DocumentReaderSample/Platforms/Android/Assets/Regula/.gitkeep b/Platforms/Android/Assets/Regula/.gitkeep similarity index 100% rename from DocumentReaderSample/Platforms/Android/Assets/Regula/.gitkeep rename to Platforms/Android/Assets/Regula/.gitkeep diff --git a/DocumentReaderSample/Platforms/Android/DocReaderInit.cs b/Platforms/Android/DocReaderInit.cs similarity index 100% rename from DocumentReaderSample/Platforms/Android/DocReaderInit.cs rename to Platforms/Android/DocReaderInit.cs diff --git a/DocumentReaderSample/Platforms/Android/DocReaderScanner.cs b/Platforms/Android/DocReaderScanner.cs similarity index 91% rename from DocumentReaderSample/Platforms/Android/DocReaderScanner.cs rename to Platforms/Android/DocReaderScanner.cs index 066ae66..7817e7e 100644 --- a/DocumentReaderSample/Platforms/Android/DocReaderScanner.cs +++ b/Platforms/Android/DocReaderScanner.cs @@ -35,10 +35,14 @@ public void OnCompleted(int action, DocumentReaderResults results, DocumentReade IsReadRfid = false; return; } + + var portrait = results.GetGraphicFieldImageByType(EGraphicFieldType.GfPortrait); + var rfidPortrait = results.GetGraphicFieldImageByType(EGraphicFieldType.GfPortrait, ERPRM_ResultType.RfidResultTypeRfidImageData); + if (rfidPortrait != null) portrait = rfidPortrait; ResultsObtained(this, new DocReaderScannerEvent { SurnameAndGivenNames = results.GetTextFieldValueByType(EVisualFieldType.FtSurnameAndGivenNames), - PortraitField = ConvertBitmap(results.GetGraphicFieldImageByType(EGraphicFieldType.GfPortrait)), + PortraitField = ConvertBitmap(portrait), DocumentField = ConvertBitmap(results.GetGraphicFieldImageByType(EGraphicFieldType.GfDocumentImage)) }); } diff --git a/DocumentReaderSample/Platforms/Android/MainActivity.cs b/Platforms/Android/MainActivity.cs similarity index 86% rename from DocumentReaderSample/Platforms/Android/MainActivity.cs rename to Platforms/Android/MainActivity.cs index 547bcd9..1ffca2c 100644 --- a/DocumentReaderSample/Platforms/Android/MainActivity.cs +++ b/Platforms/Android/MainActivity.cs @@ -6,7 +6,7 @@ namespace DocumentReaderSample; -[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)] +[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ScreenOrientation = ScreenOrientation.Portrait, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)] public class MainActivity : MauiAppCompatActivity { internal static MainActivity Instance { get; private set; } diff --git a/DocumentReaderSample/Platforms/Android/MainApplication.cs b/Platforms/Android/MainApplication.cs similarity index 100% rename from DocumentReaderSample/Platforms/Android/MainApplication.cs rename to Platforms/Android/MainApplication.cs diff --git a/DocumentReaderSample/Platforms/Android/PhotoPickerService.cs b/Platforms/Android/PhotoPickerService.cs similarity index 100% rename from DocumentReaderSample/Platforms/Android/PhotoPickerService.cs rename to Platforms/Android/PhotoPickerService.cs diff --git a/DocumentReaderSample/Platforms/Android/Resources/values/colors.xml b/Platforms/Android/Resources/values/colors.xml similarity index 100% rename from DocumentReaderSample/Platforms/Android/Resources/values/colors.xml rename to Platforms/Android/Resources/values/colors.xml diff --git a/DocumentReaderSample/Platforms/iOS/AppDelegate.cs b/Platforms/iOS/AppDelegate.cs similarity index 100% rename from DocumentReaderSample/Platforms/iOS/AppDelegate.cs rename to Platforms/iOS/AppDelegate.cs diff --git a/DocumentReaderSample/Platforms/iOS/DocReaderInit.cs b/Platforms/iOS/DocReaderInit.cs similarity index 100% rename from DocumentReaderSample/Platforms/iOS/DocReaderInit.cs rename to Platforms/iOS/DocReaderInit.cs diff --git a/DocumentReaderSample/Platforms/iOS/DocReaderScanner.cs b/Platforms/iOS/DocReaderScanner.cs similarity index 88% rename from DocumentReaderSample/Platforms/iOS/DocReaderScanner.cs rename to Platforms/iOS/DocReaderScanner.cs index 4a17f81..1eff7f8 100644 --- a/DocumentReaderSample/Platforms/iOS/DocReaderScanner.cs +++ b/Platforms/iOS/DocReaderScanner.cs @@ -39,10 +39,14 @@ private void OnResultsObtained(RGLDocReaderAction action, RGLDocumentReaderResul IsReadRfid = false; return; } + + var portrait = result.GetGraphicFieldImageByType(RGLGraphicFieldType.Portrait); + var rfidPortrait = result.GetGraphicFieldImageByType(RGLGraphicFieldType.Portrait, RGLResultType.RfidImageData); + if(rfidPortrait != null) portrait = rfidPortrait; ResultsObtained(this, new DocReaderScannerEvent { SurnameAndGivenNames = result.GetTextFieldValueByType(RGLFieldType.Surname_And_Given_Names), - PortraitField = ConvertImage(result.GetGraphicFieldImageByType(RGLGraphicFieldType.Portrait)), + PortraitField = ConvertImage(portrait), DocumentField = ConvertImage(result.GetGraphicFieldImageByType(RGLGraphicFieldType.DocumentImage)) }); } diff --git a/DocumentReaderSample/Platforms/iOS/Entitlements.plist b/Platforms/iOS/Entitlements.plist similarity index 100% rename from DocumentReaderSample/Platforms/iOS/Entitlements.plist rename to Platforms/iOS/Entitlements.plist diff --git a/DocumentReaderSample/Platforms/iOS/Info.plist b/Platforms/iOS/Info.plist similarity index 81% rename from DocumentReaderSample/Platforms/iOS/Info.plist rename to Platforms/iOS/Info.plist index 1fe440a..e854d3b 100644 --- a/DocumentReaderSample/Platforms/iOS/Info.plist +++ b/Platforms/iOS/Info.plist @@ -16,15 +16,10 @@ UISupportedInterfaceOrientations UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight UISupportedInterfaceOrientations~ipad UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight XSAppIconAssets Assets.xcassets/appicon.appiconset diff --git a/DocumentReaderSample/Platforms/iOS/PhotoPickerService.cs b/Platforms/iOS/PhotoPickerService.cs similarity index 100% rename from DocumentReaderSample/Platforms/iOS/PhotoPickerService.cs rename to Platforms/iOS/PhotoPickerService.cs diff --git a/DocumentReaderSample/Platforms/iOS/Program.cs b/Platforms/iOS/Program.cs similarity index 100% rename from DocumentReaderSample/Platforms/iOS/Program.cs rename to Platforms/iOS/Program.cs diff --git a/DocumentReaderSample/Properties/launchSettings.json b/Properties/launchSettings.json similarity index 100% rename from DocumentReaderSample/Properties/launchSettings.json rename to Properties/launchSettings.json diff --git a/DocumentReaderSample/Resources/AppIcon/appicon.svg b/Resources/AppIcon/appicon.svg similarity index 100% rename from DocumentReaderSample/Resources/AppIcon/appicon.svg rename to Resources/AppIcon/appicon.svg diff --git a/DocumentReaderSample/Resources/AppIcon/appiconfg.svg b/Resources/AppIcon/appiconfg.svg similarity index 100% rename from DocumentReaderSample/Resources/AppIcon/appiconfg.svg rename to Resources/AppIcon/appiconfg.svg diff --git a/DocumentReaderSample/Resources/Fonts/OpenSans-Regular.ttf b/Resources/Fonts/OpenSans-Regular.ttf similarity index 100% rename from DocumentReaderSample/Resources/Fonts/OpenSans-Regular.ttf rename to Resources/Fonts/OpenSans-Regular.ttf diff --git a/DocumentReaderSample/Resources/Fonts/OpenSans-Semibold.ttf b/Resources/Fonts/OpenSans-Semibold.ttf similarity index 100% rename from DocumentReaderSample/Resources/Fonts/OpenSans-Semibold.ttf rename to Resources/Fonts/OpenSans-Semibold.ttf diff --git a/DocumentReaderSample/Resources/Images/mainpage_id_icon.png b/Resources/Images/mainpage_id_icon.png similarity index 100% rename from DocumentReaderSample/Resources/Images/mainpage_id_icon.png rename to Resources/Images/mainpage_id_icon.png diff --git a/DocumentReaderSample/Resources/Images/mainpage_portrait_icon.png b/Resources/Images/mainpage_portrait_icon.png similarity index 100% rename from DocumentReaderSample/Resources/Images/mainpage_portrait_icon.png rename to Resources/Images/mainpage_portrait_icon.png diff --git a/DocumentReaderSample/Resources/Raw/.gitkeep b/Resources/Raw/.gitkeep similarity index 100% rename from DocumentReaderSample/Resources/Raw/.gitkeep rename to Resources/Raw/.gitkeep diff --git a/DocumentReaderSample/Resources/Splash/splash.svg b/Resources/Splash/splash.svg similarity index 100% rename from DocumentReaderSample/Resources/Splash/splash.svg rename to Resources/Splash/splash.svg diff --git a/DocumentReaderSample/Resources/Styles/Colors.xaml b/Resources/Styles/Colors.xaml similarity index 100% rename from DocumentReaderSample/Resources/Styles/Colors.xaml rename to Resources/Styles/Colors.xaml diff --git a/DocumentReaderSample/Resources/Styles/Styles.xaml b/Resources/Styles/Styles.xaml similarity index 100% rename from DocumentReaderSample/Resources/Styles/Styles.xaml rename to Resources/Styles/Styles.xaml diff --git a/DocumentReaderSample/Scenario.cs b/Scenario.cs similarity index 100% rename from DocumentReaderSample/Scenario.cs rename to Scenario.cs