barcode-to-pc-app icon indicating copy to clipboard operation
barcode-to-pc-app copied to clipboard

Does it support call from Javascript ?

Open mims92 opened this issue 7 years ago • 3 comments

Hi,

  1. Is it possible to call it from javascript from web browser ?
  2. When calling the app from Javascript, is possible to get the barcode number ?

Thanks

mims92 avatar Dec 31 '17 14:12 mims92

Hi,

I guess that is possible with ionic cordova run browser, what are you trying to achieve?

fttx avatar Dec 31 '17 15:12 fttx

A web app (chrome, firefox) to scan all the food/groceries which will use native Android app to scan barcode. It is possible to with the native Android barcode scanner but integrated with this kind of solution could be helpful (even if I just discovered the app :)

mims92 avatar Dec 31 '17 15:12 mims92

The Android/iOS app connects to a Websocket server that is launched by the desktop program. If you need to send the barcodes to the desktop browser you must heavily edit the current architecture, maybe by creating a server that forwards the barcodes from the app WS client to the desktop WS client, or by embedding the server in to the app and connect the desktop browser to it.

What I suggest to you is to use the already present feature called "Real-time keystrokes" and listen for keyup events on your webpage. The only downside is that you must always keep the focus on the webpage

fttx avatar Dec 31 '17 15:12 fttx