Hello Friends ,,
I have a problem with click on notification from notification center ( in android ) ,
when I receive notification the userInteraction is false and when i click the notification also it's keep false without any change ..
any solution ?
Hi, Are you using Local notification?
actually I am using remote notification .
One thing also , I think is related with it , onNotification() is not fire when tapping also
userInteraction I put insideonNotification() and whole code inside constructor
Also same issue here.
Push notification is configured in componentDidMount however userInteraction is just missing on notification that is opened from notification center
Same here.
Using: 3.1.3 - the version before AndroidX as we haven't migrated yet.
Also should migration to AndroidX be a major version bump? 馃
Same here on iOS, when I have the app in foreground, I open the notificacion center and tap a notification, onNotification is called but the userInteraction flag is false.
Any solution?
react-native-puth-notification: 3.1.9
ios: 13.2.3
Android works great.
the same
This workaround worked for me. (android)
import nextFrame from "next-frame";
// ..
async onNotification (notification) {
await nextFrame(); // this is required to get appState == active
notification.userInteraction = notification.userInteraction || (!notification.foreground && AppState.currentState == "active");
}
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.
Most helpful comment
Same here on iOS, when I have the app in foreground, I open the notificacion center and tap a notification,
onNotificationis called but theuserInteractionflag is false.Any solution?
react-native-puth-notification: 3.1.9
ios: 13.2.3
Android works great.