1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
  | //using System; 
 |  //using ZXing.Mobile; 
 |    
 |  //namespace Shared.Droid 
 |  //{ 
 |  //    public static class Scan 
 |  //    { 
 |  //        static ZXing.Mobile.MobileBarcodeScanner scanner; 
 |  //        public static async System.Threading.Tasks.Task ScanQRcode(Action<string> action) 
 |  //        { 
 |  //            if (scanner == null) 
 |  //            { 
 |  //                scanner = new ZXing.Mobile.MobileBarcodeScanner(new UIKit.UIViewController { }); 
 |  //            } 
 |    
 |  //            var result = await scanner.Scan(); 
 |    
 |  //            if (result != null) 
 |  //                action?.Invoke(result.Text); 
 |  //            else 
 |  //                action?.Invoke(null); 
 |    
 |    
 |  //        } 
 |  //    } 
 |  //} 
 |  
  |