Giter VIP home page Giter VIP logo

Comments (3)

Linoa65 avatar Linoa65 commented on June 11, 2024 1

Hello !

To update in background, it's not an issue about this module. You need to use Firebase Cloud Messaging, to allow your app to handle messaging notification. With that, your app will be able to run background task, and it allows you to update the badge there.

Add this line to index.js

AppRegistry.registerHeadlessTask("RNFirebaseBackgroundMessage", () => MyBackgroundService);

MyBackgroundService.js

export default async (message) => {
    console.log("Received!", message);
}

You need to set up your android manifest and link correctly the module.

For more info :
https://firebase.google.com/docs/cloud-messaging/
https://rnfirebase.io/docs/v5.x.x/messaging/android

I let you mark as closed if you have no questions :)

Best regards,
Florient

from react-native-android-badge.

gitpayal avatar gitpayal commented on June 11, 2024

@fabdrol : Did you find any solution for this? I am facing same issue

from react-native-android-badge.

dsomel21 avatar dsomel21 commented on June 11, 2024

@Linoa65 Will this work for iOS?

If you look at RN Firebases 6 documentation, Android highlights how it offers Foreground Service Notifications for dealing with long-running background tasks but nothing is said about iOS.

I can see why @fabdrol would say that the documentation is sparse because hard to tell one and two apart.

EDIT: I see that this is the react-native-android-badge repo, not the interface RN Firebase repo

from react-native-android-badge.

Related Issues (14)

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.