bfee0dde03
Camera2 + ZXing.Net 0.16.9 activity (ScannerActivity) that captures JPEG frames at ~2.5 fps and decodes QR codes without Xamarin dependencies. Result is returned to MainActivity via OnActivityResult/TaskCompletionSource. PlatformServices.ScanQrAsync seam wires Android head to shared App layer; ScanQrCommand in the Send ViewModel strips BIP21 URI scheme/query parameters. CAMERA permission and uses-feature added to AndroidManifest.
18 lines
548 B
C#
18 lines
548 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace PalladiumWallet.App.Services;
|
|
|
|
/// <summary>
|
|
/// Seam per servizi specifici della piattaforma (Android/desktop).
|
|
/// Il head Android imposta i delegate in OnCreate; desktop li lascia null.
|
|
/// </summary>
|
|
public static class PlatformServices
|
|
{
|
|
/// <summary>
|
|
/// Apre lo scanner QR nativo e restituisce il testo raw del codice,
|
|
/// oppure null se l'utente annulla o lo scanner non è disponibile.
|
|
/// </summary>
|
|
public static Func<Task<string?>>? ScanQrAsync { get; set; }
|
|
}
|