Code Monkey home page Code Monkey logo

Comments (10)

willyaranda avatar willyaranda commented on May 22, 2024

I have been doing some quick tests with the tag attribute in the Notification object.

  • I can arrange group and individual chats, so just one notification is shown for the same chat
  • The problem is that each time you send a notification (new message), the screen is lighted and the sound is played (unless the phone is in silent mode).

So my idea is:

  • Group notifications with the tag property.
  • Only send a notification if there are no pending notifications for the chat. That means that you will get the first one (maybe the second one and say "multiple messages"?), and then no notifications are sent for the rest of the messages.
  • Or even better, do the second point, but put a timestamp, so if I get a new message in a chat which the shown notification has been living for more than ¿5 minutes? make the notification again.

thoughts? :)

from webogram.

nukeador avatar nukeador commented on May 22, 2024

Third option sounds good to avoid over notifying the user, but how is that going to work on desktop?

Probably on desktop you want to have them all.

from webogram.

willyaranda avatar willyaranda commented on May 22, 2024

Sniffing user agent for (mobile || tablet) ?

from webogram.

nukeador avatar nukeador commented on May 22, 2024

Sniffing UA is not clean.

Probably the first thing to do is group notifications for everyone, and then create a setting to always notify or just notify once.

from webogram.

willyaranda avatar willyaranda commented on May 22, 2024

UA sniffing is not clean but it is the way we can check if we are in a mobile/tablet/desktop.

I think grouping is the first iteration, and I would go with not bothering the user if a notification for the same chas has arrived in the las 5 minutes. And keep the foundation for next iterations.

from webogram.

nukeador avatar nukeador commented on May 22, 2024

Sounds good for me.

@zhukov what do you think?

from webogram.

zhukov avatar zhukov commented on May 22, 2024

So the user will not know about new messages, except the first one?

from webogram.

nukeador avatar nukeador commented on May 22, 2024

And notified again in 5 minutes if there is new messages. The thing is that I don't know how that work for desktop. The important first step is to group notifications, which doesn't affect desktop.

from webogram.

willyaranda avatar willyaranda commented on May 22, 2024

Anyway, we can propose enhancements to current API in case we do not find these behaviours useful.

from webogram.

stefan-niedermann avatar stefan-niedermann commented on May 22, 2024

UA sniffing is not clean but it is the way we can check if we are in a mobile/tablet/desktop.

What about Media Queries? Could be accessed via JS and if DPI and Size fits, the device could be detected.

from webogram.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.