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"); } }
public static RedLaser GetInstance() { if (_instance == null) { _instance = new RedLaser(); } return(_instance); }
public static RedLaser GetInstance(Context context) { if (_instance == null) { _instance = new RedLaser(context); } return(_instance); }
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()); } }
public static RedLaser GetInstance(Context context) { if (_instance == null) _instance = new RedLaser(context); return _instance; }