Giter Site home page Giter Site logo

Comments (6)

helenaford avatar helenaford commented on August 21, 2024 1

It should be possible to track how many notifications are displayed in a group using the DISMISSED events, and when the group gets to 1, delete the group via cancelNotification(groupId) and redisplay the last notification.

from notifee.

yotam-nots avatar yotam-nots commented on August 21, 2024

Code that reproduces the issue:

const androidChannelId = await notifee.createChannel({
  id: "default",
  name: "Default Channel",
  sound: "default",
  importance: Importance.HIGH,
});
await notifee.displayNotification({
  title: "group",
  id: "group-id",
  subtitle: "subtitle",
  android: {
    channelId: androidChannelId,
    groupSummary: true,
    groupId: "group-id",
    smallIcon: "notification_icon",
    color: "#ffcc11",
    groupAlertBehavior: AndroidGroupAlertBehavior.CHILDREN,
    pressAction: {
      launchActivity: "default",
      id: "default",
    },
  },
});
await notifee.displayNotification({
  id: "notification-id",
  title: "title",
  subtitle: "hello",
  body: "body",
  android: {
    importance: Importance.HIGH,
    channelId: androidChannelId,
    color: "#ffcc11",
    smallIcon: "notification_icon",
    groupId: "group-id",
  },
});
await notifee.cancelNotification("notification-id");

WhatsApp Image 2020-06-23 at 3

from notifee.

yotam-nots avatar yotam-nots commented on August 21, 2024

@helenaford that could work, but I feel like it could be nice if it was taken care of on the library level. Seems like a lot of logic, and that anyone who uses groups would need to reimplement

from notifee.

helenaford avatar helenaford commented on August 21, 2024

@yotam-nots It only occurs if you are using groups with cancelNotification. Not sure how much this happens, maybe it's common feature... something we can look into.

from notifee.

yotam-nots avatar yotam-nots commented on August 21, 2024

thanks!

possibly related: maybe the (missing?) tag functionality could help here?

from notifee.

helenaford avatar helenaford commented on August 21, 2024

Please reopen if this is still an issue.

from notifee.

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.