Giter Club home page Giter Club logo

Comments (9)

zo0r avatar zo0r commented on May 29, 2024 3

By default if the app is open no notification is shown.

You can use onNotification to get the received notification, check foreground for true (to prevent duplicated notifications) and show it using PushNotification.localNotification(details: Object).

from react-native-push-notification.

rochapablo avatar rochapablo commented on May 29, 2024 3

I'm following what @zo0r said, but nothing it's been shown.

from react-native-push-notification.

avishayil avatar avishayil commented on May 29, 2024

Working, thanks.

from react-native-push-notification.

hugomosh avatar hugomosh commented on May 29, 2024

Yes, not working anymore. I do PushNotification.localNotification and it loops. Not sure how to send a parameter to avoid the eternal loop. But not showing either way, until I close the app I get one notification.

    onNotification: function(notification) {
        console.log('NOTIFICATION:', notification);
        if (notification.foreground) {
          //Diplay the remote notification 
           //This->do not work (loop and notification when app closes)
          //PushNotification.localNotification({message:notification.message,details:{repeted:true}})
         //Temporal solution
         Alert.alert('News from Team', notification.message);
        }
      },

from react-native-push-notification.

khrizt avatar khrizt commented on May 29, 2024

It works for me. No eternal loop.

from react-native-push-notification.

zedtux avatar zedtux commented on May 29, 2024

PushNotification.localNotification is not showing notification while in the app, like @rochapablo. This bug is present since at least year, based on the comments age, what could we do @zo0r ?

from react-native-push-notification.

olgaababic avatar olgaababic commented on May 29, 2024

The bug is still present

from react-native-push-notification.

MarioGPortilla avatar MarioGPortilla commented on May 29, 2024

Same for me, bug still happening

from react-native-push-notification.

Dallas62 avatar Dallas62 commented on May 29, 2024

You must create a channel.
Regards

from react-native-push-notification.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.