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 actions are not working. #20

Open
balya7777 opened this issue Aug 16, 2024 · 0 comments
Open

notification actions are not working. #20

balya7777 opened this issue Aug 16, 2024 · 0 comments

Comments

@balya7777
Copy link

CordovaLocalNotifications.schedule({
id: new Date().getTime(),
title: notification.data.title,
text: notification.data.body,
progressBar: { value: parseInt(notification.data.body!.slice(0, -1)), maxValue: 100 },
actions: [
{ id: 'yes', title: 'Yes' },
{ id: 'no', title: 'No' }
],
});

CordovaLocalNotifications.on('yes').subscribe((notification: any) => {
console.log('Notification clicked:', notification);
alert(JSON.stringify(notification));
});
CordovaLocalNotifications.on('no').subscribe((notification: any) => {
console.log('Notification clicked:', notification);
alert(JSON.stringify(notification));
});

the app doesn't show alert

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

1 participant