The .NET MAUI project is ported from Xamarin.Forms barcode QR code scanner.
-
Import the project to
Visual Studio 2022 Preview
, which supports .NET MAUI. -
Apply for a 30-day free trial license and update the following code in MainPage.xaml.cs.
_barcodeQRCodeService.InitSDK("DLS2eyJoYW5kc2hha2VDb2RlIjoiMjAwMDAxLTE2NDk4Mjk3OTI2MzUiLCJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSIsInNlc3Npb25QYXNzd29yZCI6IndTcGR6Vm05WDJrcEQ5YUoifQ==");
-
Select a framework for Android or iOS.
-
Build and run the project.
dotnet-maui-barcode-qrcode-scanner.mp4