Bartalog / cool-maze

A quick mobile-to-desktop share capability, through matrix barcode
Apache License 2.0
2 stars 6 forks source link

Too big resource: fail upfront (Android) #576

Closed Deleplace closed 9 months ago

Deleplace commented 9 months ago

Currently: the URLs gen request fails server side, but the user does not know until they have scanned.

Desired: for now, hardcode the resource limit in the app, and fail immediately, without opening camera.

Deleplace commented 9 months ago

Currently: an error message shows up in a Toaster, but the camera doesn't stop, and the app starts misbehaving.

Deleplace commented 9 months ago

Letting the backend dynamically decide what resources to reject is fine in theory, it just happens that it's currently difficult to "abort zxing scanning intent" when handling the backend's error response. Hence, we now hardcode the max resource size in the Android app, and fail upfront without starting a scanning intent.