Comments (10)
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.
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.
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.
so instead of cancel('1'), i should put cancel(1)? let me try that out tomorrow morning dude, thanks
from cordova-plugin-local-notifications.
That makes no difference. cancel
converts the number to a string.
from cordova-plugin-local-notifications.
But between the booth calls has to be a time span.
from cordova-plugin-local-notifications.
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.
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.
Hey I am so sorry, It is working now
It is working or not?
from cordova-plugin-local-notifications.
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)
- UIWebView error when submiting to the app store
- compile() deprecated since gradle 8.0 in /src/android/build/localnotification.gradle HOT 13
- When the notification is displayed the code in the subscription event 'trigger' & 'click' hasn't been executed on iOS even app running either foreground/background. HOT 1
- Getting a build error after migrating our Ionic 5 app from Cordova 10 to Cordova 11 LOCAL NOTIFICATIONS HOT 8
- Android Build for Android Platfom 10.1.2 or 11.0.0 Crashes the app. HOT 16
- iOS: Location Trigger Notification No Longer Working
- Local Notifications Trigger events Not working on Android 12 HOT 1
- Android 12 (SDK 31+): Tap on notifications only opens app when notifications are grouped. HOT 50
- bug: Gradle 7 compatibility HOT 6
- Local notifications does not subscribe to events when the notification is triggered in the background or when device is Locked on IOS Device 16.1.2 OS HOT 1
- Local Notifications Subscribe to events when app is in the background IOS: Help please
- Small Icon and Trigger Notification in Android 12
- Play custom audio files on Ionic Cordova Local Notifications IOS
- Android 12+ notification permissions not requested and showing as blocked HOT 10
- Apps Now Having Problems Adding Plugin HOT 1
- Plugin get installed, app get compiled and launched on android, but notification is just not working. HOT 1
- Notification group with actions at a particular time
- When I click notification app crashes HOT 2
- request permission is never fired at all on android 13 HOT 4
- NullPointerException from isInForeground
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-local-notifications.