Giter Club home page Giter Club logo

Comments (10)

katzer avatar katzer commented on May 28, 2024

The usage is correct.
On Android it works for me. On iOS I found out that a notification can only be canceled if its fire date is in the future (a1f0692).

Does it works now?

from cordova-plugin-local-notifications.

tomswatermelon avatar tomswatermelon commented on May 28, 2024

I see, I updated and still can't remove the passed notification by id in iOS.

I am trying to remove the passed notification in order to remove the feed from the push notifications, since if i don't do so, the feed will stay even you tap it and enter the app again.

I can remove the passed notification by using cancelAll(), but it would be the best that I can do this by ids, too. Thank you:)

from cordova-plugin-local-notifications.

katzer avatar katzer commented on May 28, 2024

Does that example work?

window.plugin.notification.local.add({ id: 1, message: 'Reminder' });
// `add` is executed asynchron!
setTimeout('plugin.notification.local.cancel(1)', 200);

from cordova-plugin-local-notifications.

tomswatermelon avatar tomswatermelon commented on May 28, 2024

so instead of cancel('1'), i should put cancel(1)? let me try that out tomorrow morning dude, thanks

from cordova-plugin-local-notifications.

katzer avatar katzer commented on May 28, 2024

That makes no difference. cancel converts the number to a string.

from cordova-plugin-local-notifications.

katzer avatar katzer commented on May 28, 2024

But between the booth calls has to be a time span.

from cordova-plugin-local-notifications.

tomswatermelon avatar tomswatermelon commented on May 28, 2024

Hey I am so sorry, It is working now, I think I made a mistake at somewhere of my code before. but only cancel(1), means without the quotes will work, cancel('1') doesn't work.

from cordova-plugin-local-notifications.

tomswatermelon avatar tomswatermelon commented on May 28, 2024

Erm.. no, I tested this

window.plugin.notification.local.add({ id: 1, message: 'Reminder' });
// add is executed asynchron!
setTimeout('plugin.notification.local.cancel(1)', 200);

and it is not working. so far only cancelAll() will work for delecting passed notification.

from cordova-plugin-local-notifications.

katzer avatar katzer commented on May 28, 2024

Hey I am so sorry, It is working now

It is working or not?

from cordova-plugin-local-notifications.

tomswatermelon avatar tomswatermelon commented on May 28, 2024

It is not working, sorry I thought it worked and replied you so.

Anyway, it is working now since your this update: 10c6988
Hooray!!Cheers!

from cordova-plugin-local-notifications.

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.