No action run when click on notification

Hello, I’m trying implement this demo my self
I clone it and run, everything works fine. But when i create new project, add handle function like this
When new noti receive, handle _handleNotification() function called, but when i click on notification, there is no action called. I dont know if i missing something. Please help, Thank you so much!

Please help huhu :((((((((((((

Hey @huylv177, I’m sorry you’re having this problem.

I’ve pulled up the notifications documentation located here:

  componentWillMount() {

    this._notificationSubscription = Notifications.addListener(this._handleNotification);

  _handleNotification = (notification) => {
    this.setState({notification: notification});

In your example screenshot, I don’t see registerForPushNotificationsAsync() so maybe you need to include it? Let me know if that doesn’t work for you.

The content in the function you mentioned is request permission FOR IOS, and the platform im working is Android =.=
Anyway, i added that function to my componentWillMount and still same problem. Im going to out of idea

OMG i found the reason @jimmylee, just add the “data”:“whatever” to post body, and then we can handle action user click on notification. This should be a bug you must note :stuck_out_tongue:


This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.