-
Notifications
You must be signed in to change notification settings - Fork 2
protocols
The app can start a scan when you click over a link.
The link is like a webpage link but with another scheme (detected as link in the browser). This is called app protocol.
Using this protocols, your mobile phone will open this app or search this app on the store if it is not installed:
Protocol | Scheme | Description |
---|---|---|
qr2web | qr2web:/ | default protocol for this app. |
readbarcode | readbarcode:/ | start this app to read a barcode. |
mochabarcode | mochabarcode:// | used to emulate the mochasoft protocol |
p2spro | p2spro:// | used to emulate the pic2shop pro protocol |
At the moment, the app is only able to insert the code in the integrated browser (-webpage). In future, the app should be able to open the webpage that opened the app forwarding the parsed QR code.
Even if this app can open mocha and p2s links, they are wrong formatted. On Windows they produce an exception because this is an invalid link: p2spro://configure?
The guidelines for scheme RFC 4395 defines a protocol with a single forward slash (example: "qr2web:/
") and not with a double slash (example: "qr2web://
"). Without slashes would be even better. If you use the slash or double slashes, it means that you are using an hierarchy, at this point a link like this: "qr2web://scan=
" is completely wrong! It works currently on Android and iOS because the OS doesn't check the validity of the scheme. Under Windows, this is not accepted and the app will start with an exception (it is impossible to get the URL for the app).
So, consider writing your webpages with only 1 slash after the protocol, even for 3rd party schemes. Instead of writing scheme://scan=
or scheme:/scan?
you should use write scheme://scan/=
or scheme:/scan/?
.