Open-Smartwatch / open-smartwatch-os

The Open-Smartwatch Operating System.
https://open-smartwatch.github.io
GNU General Public License v3.0
998 stars 163 forks source link

Create the notification system #342

Closed xbohdan closed 1 year ago

xbohdan commented 1 year ago

We all like the convenience of checking notifications by looking at the watch without needing to reach for the phone.

The OSW-OS already has applications that could notify users. For example, users could see a notification when they reach their daily walking goal. They could also be informed about the weather forecast.

Creating the alarm or the timer is pointless without having the means to deliver notifications.

I propose developing the notification system as a background service that will display messages the apps may send to the user. The scheduler should handle all messages uniformly regardless of which app has published them. Its responsibilities are calculating the time when a notification should fire and drawing the appropriate banners on the screen.

Of course, this notification system will only be complete with some hardware components, like a buzzer or vibration motor.

xbohdan commented 1 year ago

This issue should be linked to the pull request bearing the same name and pull requests #339 (Feature/alarm) and #343 (Feature/timer).

simonmicro commented 1 year ago

hardware components

I could imagine, that we extend the provider-pattern we already have for the sensors to have providers to alert / vibrate the user. Maybe more generic like requestAttention(level), which could be interpreted as a blinking LED, vibrator pattern or buzzer patterns :)

uvwxy commented 1 year ago

hardware components

I could imagine, that we extend the provider-pattern we already have for the sensors to have providers to alert / vibrate the user. Maybe more generic like requestAttention(level), which could be interpreted as a blinking LED, vibrator pattern or buzzer patterns :)

One approach could be to add an Actuator class. An application then has an input (sensors) and an output (actuators). You could either request a specific type to actuate explicitely or a generic type is translated to a specific type, depending on your build setup. requestAttention(level) would map to different vibration patterns, beeper frequences, waving pattern of a servo arm, etc.

xbohdan commented 1 year ago

https://user-images.githubusercontent.com/68032402/211615168-0d6509b2-ff8a-4df3-bb55-adc45bd39898.mov

Here's a short demo prepared by @akmal-threepointsix

simonmicro commented 1 year ago

Ohmmm... Github, why did you not close this issue with #337 ? Guess I'll have to do that...