Comments (3)
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.
@fabdrol : Did you find any solution for this? I am facing same issue
from react-native-android-badge.
@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)
- Not work in lastest gradle , no exception and error
- import me.jhen.react.BadgePackage HOT 1
- [feature] add getBadgeCount function
- 小米3机型不显示角标 HOT 2
- 这个角标只兼容华为手机吗?可以兼容一下其他手机吗?例如OPPO,小米,vivo等 HOT 1
- Add an example app in code ?
- .setBadge is not a function HOT 2
- Does it work in an emulator? HOT 1
- Badge count number reverts to previous value only if you set it to zero HOT 10
- Not Working on Infinix Mobiles. HOT 1
- java.lang.NoSuchMethodError: No static method applyCount HOT 3
- TypeError: undefined is not an object (evaluating '_reactNativeAndroidBadge2.default.setBadge') HOT 5
- Property 'setBadge' of undefined HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-android-badge.