Damus
Derek Ross profile picture
Derek Ross
@Derek Ross
any flutter devs out there? how do i make an app reconnect and resubscribe to relays after the app has been backgrounded / slept. this is my largest hurdle with the divine flutter app.
5❤️3🫂1
Adam Simecka · 13w
Yeah, man. Not a great option for this. What we are doing is just pinging the device for a set period of time. For example, you could ping it after 6 hours, then 24 hours, then a week, then every month. That's the only solution I've been able to find.
Kieran · 13w
It should be managed by nostr-sdk on flutter
reis · 13w
https://api.flutter.dev/flutter/widgets/WidgetsBindingObserver-class.html This might be what you are looking for. You can detect fore/background state.