question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Native notifications

See original GitHub issue

So the native OS notification PR (#3389) is currently on halt due to unclear requirements. I would like to get back to developing on it, but we first need to resolve some questions:

  • How should the public API look like? Where should notifications live? How should we identify notifications (for instance when receiving an close/dismiss event)?
  • How should the application be registered with the OS? On Windows (10) it’s required to install a shortcut that is associated with the “AppUserModelID” of the application. On OSX it’s required to install a bundle identifier. In both scenarios we need a way for the user to provide input for this registration process.
  • Where should the NativeNotificationManger live? @kekekeks argued that it should be on the TopLevel. I recall that @grokys did not really like this (?).
  • What about Windows8/8.1? They both seem to have (partial) support for the ToastNotification API but supporting Windows 10 is certainly easier due to the convenient Microsoft.Windows.SDK.Contracts package.

We should probably figure out the application registration before everything else. Also instead of making a giant PR with all platform support we should start slow with Windows (10) support and ship other OS one-by-one.

Any thoughts?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
pr8xcommented, Feb 7, 2021

For anybody interested: I put most of the code from the PR in to a standalone library for now. https://github.com/pr8x/DesktopNotifications

Closing this ticket for now.

CC: @nitanmarcel

3reactions
kekekekscommented, Oct 5, 2020

Fire-and-forget approach leads to swallowed exceptions. Why is everyone so obsessed with sync APIs? You aren’t writing winforms code in 2002 anymore. Anything outside of plain computations is asynchronous in its nature. Writing to disk? Async. Network? Async. GPU rendering? Async. IPC? Async. Communications with the window server? Yes, you’ve guessed it, they are async too. Some systems try to hide those async APIs behind sync facades which leads to numerous issues like app freeze when attempting to access clipboard.

Read more comments on GitHub >

github_iconTop Results From Across the Web

wix/react-native-notifications
Handle all the aspects of push notifications for your app, including remote and local notifications, interactive notifications, silent notifications, and more.
Read more >
react-native-notifications
Advanced Push Notifications (Silent, interactive notifications) for iOS & Android. Latest version: 5.0.0, last published: a month ago.
Read more >
React Native Notifications Getting Started Guide
Currently this guide is written for react-native-notifications@^3.0.0.
Read more >
How to create and send push notifications in React Native
Learn all about how to implement push notifications in React Native in this ultimate guide and step-by-step tutorial.
Read more >
User Notifications | Apple Developer Documentation
Push user-facing notifications to the user's device from a server, or generate them locally from your app.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found