HTML Example Page 2

(http://www.brb24.de/example2.html)

Feedback to the user

If you do something with barcodes in your own app, it can be helpful to give accustic or tactile feedback to the user.

Example: If a scanned product was not found in your stock or is sold out, you may want to let the device beep. It is as simple as calling this function: AndroidScanbrowser.beep(80,200,9).

Have a look at the Javascript code of the following buttons, to find you how to let the device beep, vibrate or show a toast.

Inject script

Sometimes it is useful to be able to do some things on a webpage with one click. For this you can use "Inject script". Clicking "Inject script" in the menue will apply your script to the shown page.

Example: You need to login to a website, which you want to use in ScanToURL. You can write javascript similar to this as your "Inject script":

function myLogin() { document.getElementById('username').setAttribute('value', 'mike@example.com'); document.getElementById('password').setAttribute('value', '12345'); document.getElementById('send-button').click(); }; myLogin();

To define your javascript code for "Inject script" go to Settings / Advanced / Inject Script

Config by links

You can start und configure ScanBowser also using web links. These links works from inside and outside ScanBrowser. So if you are in Chrome and press a ScanBrowser config link, it starts Scanbrowser and set's it up. These links work only if ScanBrowser is still installed on the device, and "Config by Links" is activated in Settings / Gerneral.

For ScanToURL use a link like this:
scanbrowser://scantourl/?url=yourURLEncodedURL
Example link

For ScanToJS use a link like this:
scanbrowser://scantojs/?url=yourURLEncodedURL
Example link

To only open ScanBrowser use:
scanbrowser://start/
Example link


page 1 page 2