I am trying to figure out how to add multiple action buttons to local notifications. I have read the ngCordova local notification docs but it does not seem to be available. I am looking for the equivalent of multiple ion-option-buttons on an ion-item but for a lock screen notification. I think ios calls these interactive local notifications and notification actions.
As an example left swiping on GMail notification on the ios lock screen shows the cancel “X” along with buttons for “Reply” and “Archive”.
These changes have been merged into a branch of Sebastián Katzer’s local notification plugin for the next release, but you can use the repo linked above for now.
[12:14:07] build prod started ...
[12:14:07] clean started ...
[12:14:07] clean finished in 1 ms
[12:14:07] copy started ...
[12:14:07] ngc started ...
[12:14:11] typescript: src/pages/home/home.ts, line: 106
Argument of type '{ id: number; title: string; text: string; at: number; actions: { identifier: string;
title: stri...' is not assignable to parameter of type 'ILocalNotification | ILocalNotification[]'. Object
literal may only specify known properties, and 'actions' does not exist in type 'ILocalNotification |
ILocalNotification[]'.
L105: at: new Date().getTime(),
L106: actions: [actions[0], actions[1]],
L107: category: 'SIGN_IN_TO_CLASS'
[WARN] Error occurred during command execution from a CLI plugin (@ionic/cli-plugin-cordova). Your plugins may be out of date.
Error: Failed to transpile TypeScript
The plug-in works with the latest ionic version but the native wrapper is outdated. You can implement the Cordova way as explained here: Cordova Plugin not using ionic-native
Hi Nathan,
Thank you for the response. Do I need to add any other plugin because this seems not working. I tried below, I see notification but I don’t see action buttons in it. Thanks in advance.