-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
onNotification is not called when local notification arrives and app is in background in android #1601
Comments
Hi,
|
@Dallas62 , It still not working when the app is in background |
Does the user interact with the notification ? |
Yes set the userInteraction parameter as true |
So the user Press the notification and Does |
Yes onNotification in not called when user press in notifcation when app is in background. |
Did you test the example project ? |
I compared AndroidManifest.xml from example folder and added all changes |
Did you looked at: #1592 |
Yes @Dallas62 but not succeed |
Can't do more without a reproducible example. |
@Dallas62 , I also used PushNotification.popInitialNotification to fulfill my requirement but it also returns undefined randomly |
The initial notification is the notification which start the application, bring back to foreground an application in background doesn't change or set the initial notification. |
onNotification function gets called in android , but. in ios I am having issue to get response in onNotification function . Do. you have any suggestion on that @Dallas62 |
Yes this is an issue from the iOS library, looking into it. |
do we have any idea on how we can tackle it ? |
Hi! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions. |
Code for Local Noification
PushNotification.localNotification({
autoCancel: true,
title: 'Test Title',
message: 'Test Message',
vibrate: true,
vibration: 1000,
playSound: false,
data: {},
});
Trying to get in configure onNotification
PushNotification.configure({
onRegister: function(token) {
console.log('TOKEN:', token);
},
onNotification: function(notification) {
console.log('NOTIFICATION:', notification);
},
permissions: {
alert: true,
badge: true,
sound: true,
},
popInitialNotification: true,
requestPermissions: true,
});
The text was updated successfully, but these errors were encountered: