You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@heykishan, I was thinking if we could schedule a notification for say, T-10 seconds to launch. Having an always visible, self-updating notification with react-native seems impossible, at least based on my Google-fu 😆
We will have to make sure we do not trigger duplicate notifications but this can be easily handled by persisting the launch timestamp in AsyncStorage. If there is an entry for that timestamp, we can just skip scheduling another notification.
AFAIK, the only thing we will have to figure out is what to do if a launch gets postponed. It would be funny to send a false notification. One idea is to have a last modified time kind of stamp in storage, similar to:
// assume 123 is the launch timestamp(launch time as unix epoch){123: notificationId-lastModifiedTime// from the API response}
This way, if the API response's last modified time doesn't match the one persisted(which we can extract by doing a simple .split('-'), we cancel the scheduled notification and schedule another one.
Please let me know what you think of this approach and if there's some other easy path that we could take. I really want to keep this codebase as simple as possible 😁
This is badly needed to enable quickly switching to the camera.
The text was updated successfully, but these errors were encountered: