fullphat / snarl

When { stuff_happens(); tell_me() }
http://snarl.fullphat.net
57 stars 2 forks source link

Integrate Windows 10 Action Center Database #91

Open rbreaves opened 4 years ago

rbreaves commented 4 years ago

I believe at this point with microsoft having official support for notifications it would be better to tie into the existing system or at least let that be an option. Most 3rd party applications now use native push notification support of the OS.

Windows 10, unlike macOS or Linux has 1 severe limitation - they can only ever show the notifications in the bottom right corner. Another limitation I've noticed is that I don't believe hyperlinks are clickable in the notifications either.

The sqlite3 database is located here. %APPDATA%\Local\Microsoft\Windows\Notifications\wpndatabase.db

It'd be good to just monitor that file for changes and then push those notifications into your application. Granted you might want to create a panel that control which apps should show notifications and which ones shouldn't.

The feature I would be looking forward to the most would be the relocation of Action Center notifications to any corner on my screen.

fullphat commented 4 years ago

Hi Ben

Thanks for the note. Will look into this, although right now development on Snarl is largely paused while I focus on some iOS apps I'm developing.

Hope to cycle back round to Snarl development some point in the future. 👍🏼

Thanks again

On 11 Oct 2020, at 01:12, Ben Reaves notifications@github.com wrote:

 I believe at this point with microsoft having official support for notifications it would be better to tie into the existing system or at least let that be an option. Most 3rd party applications now use native push notification support of the OS.

Windows 10, unlike macOS or Linux has 1 severe limitation - they can only ever show the notifications in the bottom right corner. Another limitation I've noticed is that I don't believe hyperlinks are clickable in the notifications either.

The sqlite3 database is located here. %APPDATA%\Local\Microsoft\Windows\Notifications\wpndatabase.db

It'd be good to just monitor that file for changes and then push those notifications into your application. Granted you might want to create a panel that control which apps should show notifications and which ones shouldn't.

The feature I would be looking forward to the most would be the relocation of Action Center notifications to any corner on my screen.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

rbreaves commented 4 years ago

Np, I’ve been thinking about writing this myself but since Snarl seems like a precursor to notifications that are now built in figure I’d mention it to you first lol.

I was surprised to learn the notifications in win10 are stored in sqlite3 tbh.

TeamSpen210 commented 4 years ago

There's actually an API for to allow listening to the notifications. It's not entirely complete (a lot of the data seems to always be null), but you could then check the database to eliminate polling. You can also just cancel the notifications to stop it from showing up.