Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification keep showing as new shedule instead of updating #26

Open
templatetuners opened this issue Aug 7, 2019 · 1 comment
Open

Comments

@templatetuners
Copy link

Notifications keeps showing as new ones instead of staying in background and just update.

I set and check notifications every 5 seconds.
First I use this to schedule

$.each(data.reports, function(i, v) {
  cordova.plugins.notification.local.schedule({
    id: i,
    title: v.Title,
    text: status,
    channel: 'Primary',
    priority: 1,
    clock: false,
    autoClear: true,
    wakeup: false,
    sticky: false, 
    lockscreen: false,
    foreground: true,
    progressBar: { 
      value: Number(v.Progress) 
    }
  });
});

After this I am updating them

cordova.plugins.notification.local.update({
  id: i,
  text: status,
  sound: false,
  progressBar: {
    value: progress
   }
});

My notification should start, so show popup notification, than should run in background and update progress bar untill 100%. At the end I will remove it.

@tripflex
Copy link

hmm weird ... mine works fine for this (with the exception of when i do an update call, the action buttons seem to get added every time).

I am using the progress bar though same as you above, on Android 10 (Pixel 3 XL) ... are you sure you're using the correct id value when calling update? Maybe log that out and verify it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants