This opens a modal with the camera, and a button (top right) which closes the modal:
If you scan a valid URL, such as this one:
Then the server URL is updated and you get a confirmation toast.
If the QR code is not of a valid URL, such as this one:
Then the scanner closes and you get an error toast:
Wrt the QR scanner package: I tried a number of different packages. This one isn't the fullest featured or latest or most popular.. but it works. There were issues with dependencies with some, our outdated gradle version with others..
Most of them won't build with our application. With this one, I've been able to scan the small version of the omSupply QR reliably, so I'm happy with that.
Fixes #266
Adds a QR code scanning button to the server URL:
This opens a modal with the camera, and a button (top right) which closes the modal:
If you scan a valid URL, such as this one:
Then the server URL is updated and you get a confirmation toast. If the QR code is not of a valid URL, such as this one:
Then the scanner closes and you get an error toast:
Wrt the QR scanner package: I tried a number of different packages. This one isn't the fullest featured or latest or most popular.. but it works. There were issues with dependencies with some, our outdated gradle version with others.. Most of them won't build with our application. With this one, I've been able to scan the small version of the omSupply QR reliably, so I'm happy with that.