Hello,
I am using the @ionic-native/local-notifications plugin to create a notification that allows the user to input text.
this.localNotifications.schedule({
title: "title",
text: "body",
actions: [
{ id: "reply", title: "Input", type: ILocalNotificationActionType.INPUT }
]
});
And then I catch the event using the following code
this.localNotifications.on("reply").subscribe((data) => {
alert(JSON.stringify(data, null, 2));
});
However, I can’t seem to find any way to get the actual user input. The data from the event doesn’t contain the user input. Is there a way to get the user input that I’m missing?
{
"title": "title",
"text": "body",
"actions": [
{
"id": "reply",
"title": "Reply",
"type": "input"
}
],
"attachments": [],
"autoClear": true,
"defaults": 0,
"foreground": false,
"groupSummary": false,
"id": 0,
"launch": true,
"led": true,
"lockscreen": true,
"number": 0,
"priority": 0,
"progressBar": {
"enabled": false,
"value": 0,
"maxValue": 100,
"indeterminate": false
},
"showWhen": true,
"silent": false,
"smallIcon": "res://icon",
"sound": true,
"trigger": {
"type": "calendar"
},
"vibrate": false,
"wakeup": true,
"meta": {
"plugin": "cordova-plugin-local-notification",
"version": "0.9-beta.2"
}
}