コード例 #1
0
        public override void OnReceive(Context context, Intent intent)
        {
            if (intent != null)
            {
                String    data       = intent.GetStringExtra(BARCODE_VALUE);
                String    typeString = intent.GetStringExtra(BARCODE_TYPE);
                Symbology symbology  = Symbology.UNKNOWN;
                switch (typeString.ToUpper())
                {
                case "UPCE":
                    symbology = Symbology.UPCE;
                    break;

                case "EAN13":
                    symbology = Symbology.EAN13;
                    break;

                case "EAN8":
                    symbology = Symbology.EAN8;
                    break;

                default:
                    symbology = Symbology.UNKNOWN;
                    break;
                }

                RedLaser.GetInstance(context).TriggerScan(data, symbology);
                Log.Info("MonoCross", "response received from scan " + data + " : " + typeString);
            }
            else
            {
                Log.Warn("MonoCross", "weird response received");
            }
        }
コード例 #2
0
ファイル: RedLaser.MT.cs プロジェクト: Zebra/iFactr-Android
 public static RedLaser GetInstance()
 {
     if (_instance == null)
     {
         _instance = new RedLaser();
     }
     return(_instance);
 }
コード例 #3
0
 public static RedLaser GetInstance(Context context)
 {
     if (_instance == null)
     {
         _instance = new RedLaser(context);
     }
     return(_instance);
 }
コード例 #4
0
        public static IBarcodeScanner Create(UIWebView webView)
        {
            DeviceHardware dhw = new DeviceHardware();

            var d = DeviceHardware.Version;

            switch (d)
            {
            case DeviceHardware.HardwareVersion.iPod2G:
            case DeviceHardware.HardwareVersion.iPod3G:
            case DeviceHardware.HardwareVersion.iPod4G:
                return(LineaPro.GetInstance(webView));

            default:
                return(RedLaser.GetInstance());
            }
        }
コード例 #5
0
 public static RedLaser GetInstance(Context context)
 {
     if (_instance == null)
         _instance = new RedLaser(context);
     return _instance;
 }