Мой вопрос: работает ли ZXing.net.MAUI с камерой по умолчанию, начиная с камеры? Потому что камера моего устройства считывает штрих-код, но другое устройство также не считывает их с помощью библиотеки. Итак, это проблема библиотеки, устройства или кода, но мой код выглядит следующим образом:
Код: Выделить всё
var cameraBarcodeReaderView = new ZXing.Net.Maui.Controls.CameraBarcodeReaderView
{
// Configura las opciones del lector aquí
Options = new BarcodeReaderOptions
{
Formats = BarcodeFormats.OneDimensional, // o los formatos específicos que necesitas
AutoRotate = true,
Multiple = true
},
// Configura la ubicación de la cámara si es necesario
CameraLocation = CameraLocation.Rear
};
// Suscribirse al evento BarcodesDetected
cameraBarcodeReaderView.BarcodesDetected += async (sender, e) =>
{
// Manejar los códigos de barras detectados aquí
if (e.Results != null && e.Results.Length > 0)
{
var result = e.Results[0];
if (result != null)
{...
Подробнее здесь: https://stackoverflow.com/questions/787 ... vices-maui
Мобильная версия