Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification Android setProgress didn't work #1167

Closed
NicolasHanzel opened this issue Jun 1, 2018 · 3 comments
Closed

Notification Android setProgress didn't work #1167

NicolasHanzel opened this issue Jun 1, 2018 · 3 comments

Comments

@NicolasHanzel
Copy link

Issue

According to your example in your documentation, I call setProgress but the notification is not displayed.

Example for progress bar in notification here : https://developer.android.com/training/notify-user/build-notification#progressbar

Do you have an idea?

const notification = new firebase.notifications.Notification()
.setNotificationId('test')
.setTitle('Progress')
.setBody('Hello World')
.setSound('default')
.android.setChannelId('testchannel')
.android.setCategory('progress')
.android.setProgress(100, 0, false)     

firebase.notifications().displayNotification(notification)`

Environment

  1. Application Target Platform: Android

  2. Development Operating System: macOs 10.13.4

  3. Build Tools: 0.55.1

  4. React Native version: 0.55.1

  5. RNFirebase Version: 4.2.0

  6. Firebase Module: Notifications

@NicolasHanzel
Copy link
Author

I found the issue,

Replace line 203 of android/src/main/java/io/invertase/firebase/notifications/DisplayNotificationTask.java

Bundle progress = android.getBundle("lights");

By

Bundle progress = android.getBundle("progress");

@chrisbianca
Copy link
Contributor

@NicolasHanzel thanks for highlighting this, I've just pushed up a fix that will make it into the next release

@Salakar
Copy link
Member

Salakar commented Jul 10, 2018

@NicolasHanzel thanks for this, fix is now live in the v4.3.0 release.


Loving react-native-firebase and the support we provide? Please consider supporting us with any of the below:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants