Superformula / mobile-test

Test for native mobile app development in iOS or Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Offline functionality

mmaitlen opened this issue · comments

For the offline functionality, is it that the cache is populated with pre-gened seeds or is it that the seeds are generated locally, saved to the cache, then uploaded to the backend when the app reconnects. If the second case is the requirement, then I presume the server side seeds are saved, or is this outside the scope? Using Cloud Firestore this would be fairly easy to implement.

It can be quite simple really. Be sure that if the QR code is valid you can always display it, even if an attempt to fetch and display fails (offline). Does that help?

I'm not sure about "if the QR code is valid". Given the seed value is a string, I'm assuming something like the qr_flutter library will display a valid value. If I'm understanding you correctly, I'll need to cache the seed value and when it expires so the QR Code can be displayed if the device goes offline. If this is the case, I'm now thinking of the case where the user is offline and the current QRCode expires. Does an error message appear informing the user to connect before they can see a new QRCode?