Open benny-shotvibe opened 10 years ago
Had some points about this in my notes. I'll put them here:
@Oblosys - so, if I understood you correctly, you are saying that in case an app is closed, and isn't runnig in the background, and a push notification is appearing on the user's screen - swiping it will not open the app, is that it?
Not entirely: after killing the app, push notifications can still be swiped to open the app. They just won't be processed in the background before the app is opened. An example of the background processing is when a push notification about new photos is received, and the app already downloads the new photos, so they are immediately available when the user swipes the notification to open the app. However, if the user killed the app, no background download will occur, and the photos will need to be downloaded once the app is opened.
When they arrive, they should be parsed into appropriate data structures, so they can be handled appropriately.
We need this so that we can open the appropriate album, or cause the appropriate album to refresh. And we also will need this to do background downloading of content in response to push notifications.
A tree of "NotificationMessage" classes should be used, similar to:
We currently have 4 types of notification messages:
Note that these aren't yet documented, but the payload is here: https://github.com/shotvibe/shotvibe-web/blob/master/photos_api/device_push.py
It appears that currently there are some TODO comments indicating that the payload for some of the iOS push notifications still needs to be added