You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have implemented categories using Notifee.setNotificationCategories
await notifee.setNotificationCategories([
{
id: 'actions',
actions: [
{
id: 'yes',
title: 'Yes',
},
{
id: 'no',
title: 'No',
},
{
id: 'reply', // Action with input
title: 'Reply',
input: {
placeholder: 'Type your reply here...', // Placeholder text for input field
buttonText: 'Send', // Text for the action button
},
},
],
},
]);
I need to call an API once the user types something in text box and clicks on reply
notifee.onBackgroundEvent(({type, detail}) => {
if (detail.pressAction.id === 'reply') {
const userInput = detail.input; // This is the input text entered by the user
console.log('User input:', userInput);
postData(userInput, detail.notification.data.conversation_id);//api call
}
});
in the above function post data should call an API with user input
It only works the second time if the app is in a quit state. How can I make it work on the first notification?
I think the app is possibly being woken up by the first notification in the background, and it works on the second notification because the app was already woken up by the first one.
The text was updated successfully, but these errors were encountered:
anoopmm
changed the title
notifee.onBackgroundEvent only calls second time
notifee.onBackgroundEvent only calls second time on iOS
Oct 21, 2024
Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
This issue will be closed in 15 days if no further activity occurs.
I have implemented categories using Notifee.setNotificationCategories
I need to call an API once the user types something in text box and clicks on reply
in the above function post data should call an API with user input
It only works the second time if the app is in a quit state. How can I make it work on the first notification?
I think the app is possibly being woken up by the first notification in the background, and it works on the second notification because the app was already woken up by the first one.
The text was updated successfully, but these errors were encountered: