Capacitor 3 Local Notification not working with " at" #4907
Unanswered
namrata-Zimbaroos
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was trying to work with Local Notification but it is not working when I am passing the date to 'at'. Could you please tell me how can it be resolved?
Without at in scheduling
home.page.ts
async scheduleBasic(){
await LocalNotifications.schedule({
notifications:[
{
title: 'Basic Reminder',
body: 'A pop up in instant',
id:1,
// // sound:null,
extra:{
data: 'Pass data to your handler'
},
iconColor: '#0000ff'
}
]
});
}
Output
With at in Scheduling
home.page.ts
async scheduleBasic(){
await LocalNotifications.schedule({
notifications:[
{
title: 'Basic Reminder',
body: 'A pop up in instant',
id:1,
schedule:{
at: new Date(Date.now())
},
// sound:null,
extra:{
data: 'Pass data to your handler'
},
iconColor: '#0000ff'
}
]
});
}
Output:
Beta Was this translation helpful? Give feedback.
All reactions