abranson / rockpool

Pebble client application for Sailfish OS
41 stars 19 forks source link

Store all missed notification and send them after restoring of Bluetooth connection. #35

Closed petRUShka closed 8 years ago

petRUShka commented 8 years ago

How it is now:

  1. Connect phone and pebble.
  2. Leave phone somewhere and go far away from phone. Loose bluetooth connection between phone and pebble.
  3. Receive several notifications (missed phones, sms and etc.)
  4. Come back to phone, autorestore bluetooth connection, don't receive any missed notifications.

How I hope it will be:

<1-2 are the same> 3. Receive **and store locally on phone** several notifications (missed phones, sms and etc.) 4. Come back to phone, autorestore bluetooth connection, **receive all stored locally on phone** notifications.
abranson commented 8 years ago

I think this was rejected in earlier iterations because it could get really messy. I'll see if there's a clean way of doing it that limits the volume of backed-up notifications, otherwise it would be too much trouble! :)

rufferson commented 8 years ago

if we make notifications via timeline engine (started in the wip) it could be automatically handled by timeline pooling. how is it on android? i have an impression notification type is not pooled, only pins are

petRUShka commented 8 years ago

May be good solution is to store last 1 hour notifications or any other time limitation.

abranson commented 8 years ago

I think pebbled kept them for a certain amount of time after disconnection, so that they would still be delivered in the case of temporary disconnections. That was before it supported multiple pebbles though, as that can make things complicated...

rufferson commented 8 years ago

will be addressed by #37 - atm notification insert is silently ignored when pebble is disconnected. Timline persistence requires all pins to be properly tracked. all due pins will be re-inserted unless they are expired. Although I'm sure we need to set some reasonable expiration time for notifications, not default 1 day.

abranson commented 8 years ago

Rockpool keeps track of when notifications are dismissed on the phone, though it does nothing to them on the watch yet because I don't know how to update notifications. Maybe in this case they could be marked as seen before they are uploaded, so they'll be visible in the Notifications app, but cause no alert.

rufferson commented 8 years ago

If I understood the concept right - the whole purpose of notification is actually to bring your attention. To store some info - pins are used. At the moment (in WIP) you can update notifications already, however if you want to update notification - this is again attention bringer - it will pop up. updateNotification section is just telling you how to display pop-up when original (createNotification) already exists. Eg. instead of saying 'New Message' you want to say 'Message Update' but otherwise it's just a notification.

abranson commented 8 years ago

That's a shame, as there are a few apps that create a notification and then regularly update the text without alerting, for instance when reporting the percentage progress of an update.

If they can't be pushed as read, then if we make sure we remove any unpushed notifications from the timeline store when they are closed on the phone, we shouldn't get a flood when the watch reconnects - even if it's been a long time.

rufferson commented 8 years ago

It's not a shame - it just requires to think it over :) If you know there's a need to show changing information - use pins, and only if that data change requires attention - attach a notification to the pin. Pins are silently added to the timeline, and the only way you can pop it up is by attached reminders and notifications. You can have a single pin with due time at midnight and then update it over the day with relevant info, attaching notification when needed. I,e. battery status - update it hourly, and only when it's below 10% attach a notification. Otherwise it will always be visible in the future timeline. Need to try whether we can shift pin's due time indefinitely - i.e. to have sliding pins.

abranson commented 8 years ago

I think that might be bending the timeline system beyond breaking point :)