Open Reckless-Satoshi opened 1 year ago
Short update on notifications.
Looks like react-native-notifications
doesn't support local notifications on Android - https://github.com/wix/react-native-notifications/blob/c877f54c8a8df713536479a2cdf740a11be966ce/README.md?plain=1#L38
It also looks like react-native-push-notifications
isn't really maintained anymore - last commit was 2 years ago and maintainer says he has stopped.
"notifee" seems to be the new kid on the block and actively maintained so I'll be evaluating that. It has a paid for vibe but is FOSS as of September (Apache)
Update: will be using react-native-background-actions for the background order status polling.
Current thinking:
/mobile
i.e. the React Native projectfrontend/src/contexts/AppContext.ts#L38
/shared
top level folder for this purposeThis one can be closed 👍
Is your feature request related to a problem? Please describe. The Android app is torified and, while on the foreground, is continuously refreshing the current order. However, when in the background the code running in the webview pauses and the order stops refreshing.
The Android app is the perfect notification system for robosats as it is fully private and secure. Any other alternative (firebase, telegra, etc has very negative impact to privacy).
Describe the solution you'd like Ideally, we should be able to run a background process that is not killed by Android and that will notify users on order status changes. I think
react-native-background-actions
andreact-native-notifications
might be good packages for this task.The order is currently refreshing on our web js. This means we will probably need to move this chunk inside of a new
systemClient
method that fetches order status as usual if the app is ran in the browser, but instead, fetches order status from the parent react-native wrapper if the app is running within the Android webview app (and triggers the notifications if needed).Additional context
This task is rewarded with :zap: 800K Sats :zap: