[Feature]: "Keep app open" reminder when viewing LN invoice
Describe the problem
Bitkit needs to remain in the foreground to receive payment via LN. We know some users will produce an invoice and copy it to send from another app on the same device, this will often not work.
See internal discussion https://synonymworkspace.slack.com/archives/C01H106JRQB/p1723735706112959
Describe the solution
We could do with a reminder on the LN invoice page so the user is aware of this limitation.
Additional context
Include in automated test suite.
The user should have a short time window available to pay themselves using with a different Lightning wallet, even when switching between apps, where Bitkit is pushed to the background. We have tested this ourselves and have seen users do this successfully in BTC Prague. Perhaps this does not work for CJIT invoices somehow? That would be odd, as these are Blocktank invoices afaik and thus don't require the user to be online.
The window where it works is very short I think. If we are going to make decisions based on this, we should test the limits of how long this works and be sure it is acceptable. My guess is that the window is not long enough to accommodate most real-world situations, but I am just guessing.
@catch-21 could you perhaps test what the available time window is on iOS & Android to pay between Lightning wallets?
I can try but it may vary by device. I've never had an issue using two apps this way but my device has plenty of RAM and it's up to the OS to manage resources. Modern versions of Android and iOS aim to allow apps to complete background tasks for a few minutes after being closed. However, older devices with resource-intensive apps will more likely experience the OS reallocating resources sooner as a priority. You also have the option to be more aggressive with battery optimisation.
added to prototype v52
This was implemented in https://github.com/synonymdev/bitkit/pull/2346