Static QR-Code preparations, SP = 5
This issue is prework for the upcoming static QR-Codes (Those qr-codes are meant to deliver or unlock e.g. fixed sets of questions or symptom checks/templates, when scanned).
The challenge here is, that a static QR-code should work when scanned with the in-app QR-Code Scanner (from within the recoverycat app), but also work if scanned by another QR-Code scanning app present on the mobile phone.
A normal QR-Code Scanning App is able to recognize urls and then open the browser and navigate to that url.
So a static QR-Code should contain a url (the url of the recoverycat app) plus extra parameters including some arbitrary data. When the brwoser navigates to that url the recoverycat client starts and it should be able to grab that arbitrary data and make use of it.
If the same static QR code is scanned with the in-app QR-Code scanner it should be able to recognize the url of the recoverycat app and parse the extra data from the url.
What to do?
- Create a new route to receive data on (e.g. /data/:base_64_encode_data)
- look for provideRoutes and checkout the angular routing guide
- announce received data with IncomingDataService (.next)
- Handle urls that include the new route, when scanned with the in-app Qr-Code scanner
- Every piece of data that is scanned with the in-app Qr-Code scanner is already announced on IncomingDataService, listen to it,
- check if it is the new route, parse for the data and announce the extracted data in IncomingDataService (.next) – or navigate to the route triggering everything from above
- Find a good name for the route and it's data parameter