Shunjid Rahman
Shunjid Rahman

Reputation: 419

Scanning barcode in Desktop-Browser using mobile

Is it possible that -

If this is possible, can anyone suggest me how to implement this one? I have been looking for some solutions but those works only in mobile.

Upvotes: 0

Views: 2093

Answers (2)

yushulx
yushulx

Reputation: 12150

If you want to use an Android device camera, you don't need to connect the device to the USB port. Not like a webcam, there's no driver for opening Android camera straightforward on PC.

A possible workaround:

  1. Use WebSocket for communication between the desktop browser (E.g. desktop.htm) and the mobile browser (E.g. mobile.htm).
  2. Use WebRTC (getUserMedia) to open Android camera in the mobile browser.
  3. Embed a JavaScript barcode SDK (E.g. ZXing or Dynamsoft JavaScript Barcode SDK) into your mobile web app.
  4. Read barcodes and sync results from mobile.htm to desktop.htm via WebSocket.

Upvotes: 1

Sorin Iercosan
Sorin Iercosan

Reputation: 41

Yes, i recomand xZing librabry: https://github.com/zxing/zxing for barcode scanner . Use the barcode scanner to write into a .txt How to Read/Write String from a File in Android or .csv How to export data to csv file in Android? file wich you can copy in your desktop. For the last part i don't have an answer..

Upvotes: 1

Related Questions