Open TJ-BitCanna opened 11 months ago
This only shows on the first time when doing so.
The 2nd attempt just gives a black screen, but no error message of missing access rights. That needs to be implemented as well.
It also crashed to the screen shown when selecting "Only this time"
For your information, this is normal behavior! The application does not crash, it restarts when the camera authorization is refused. Which is totally normal! Otherwise, it would be an Android security vulnerability.
Simply reconnect and the authorization request for the camera will be requested again.
There is nothing to do here
Can it adjust just show an error message without going back to the login page?
Something that says "no QR code can be scanned, camera access not given"? It feels a bit buggy that it goes to the login page.
Ooook! I added the use of the checkPermissions() function of capacitorJs which Check camera permissions If the camera is not authorized, there is an error message that appears on the login page and the qrcode scan page.
I haven't tried it on mobile yet, only locally on my PC but it works
To see for the formatting (error text)
Fixed here: https://github.com/BitCannaGlobal/WeedMobile/commit/447cb31db32fea24d01228b6fb1d7e71ed143233
On Android it still goes back to the login page; giving 2 error messages:
Furthermore; if no camera permissions are set the app already throws an error message "checkCameraPermissions" on the login page. This error is really only needed on the "Scan QR" page, nowhere else.
Also that the app automatically directs to the login page if camera permissions are not given would be better changed. Would be much better if it simply stayed on the "Scan QR" page, but with the error message.
Also on iOS when the camera permissions are given the app automatically redirects to the login screen.
Logging in again and going to "scan QR" will then allow scanning. But the fact that it goes back to the login screen feels buggy and unwanted behaviour.
I added a button to request access to the camera but I cannot test it in the web version so it is possible that it is not completely functional Fix here: https://github.com/BitCannaGlobal/WeedMobile/commit/9bc7e4f6cd41355983a7e39c0f81b9b071352a31
This was nicely in place, but we are now back at crashing the app.
At this stage even on fresh installs and setting the authorisations for camera use for the first time. So no changing of authorisations after the first use. This is now already happening on the very first use.
Current behaviour:
For me it brings me to the splash screen. And after that even clicking "Scan QR" gives me the splash screen 😅
Still needs a check before we go to the final version.
To reproduce: just deny the app from being allowed to use the camera :)