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

Problems with notification id #137

Closed
guzz opened this issue Jan 30, 2019 · 6 comments
Closed

Problems with notification id #137

guzz opened this issue Jan 30, 2019 · 6 comments
Labels
Milestone

Comments

@guzz
Copy link

guzz commented Jan 30, 2019

The notifications when created get a new id the the system creates automatically no matter what id I put in my notification.

When I call the getScheduledIds() method, the ids that show up are not the same that I get when the user clicks on the notification inside the addOnMessageReceivedCallback callback so it is impossible to know which notification is being clicked.

In the getScheduledIds() method I get all id´s negative like -549521321654 but when I get it from the click callback the id is always positive, and a different number.

@lord-zeus
Copy link

Got similar problem
application sets its own id which is different from the one I give to it

@MopheusDG
Copy link

MopheusDG commented Jul 6, 2019

Same problem for me, quite crazy ID's actually:

JS: ID's: -931032346,-934783024,-933941899,-937974642,-935749272,-934308609,-919
366020,-917339210,-916723179

Any workaround to identify the schedules created ?

@EddyVerbruggen
Copy link
Owner

iOS, Android, or both?

@MopheusDG
Copy link

I only tested on Android so far, will try to check on iOS tomorrow (Don't have a mac here).

@MopheusDG
Copy link

By the way, is there any way to get all the schedule ID's with the AT date included ? Thanks @EddyVerbruggen

@EddyVerbruggen EddyVerbruggen added this to the 4.0.1 milestone Jul 9, 2019
@EddyVerbruggen
Copy link
Owner

I've always passed in the id's myself so didn't really see this issue on Android (add id: 2 to the notification payload of the schedule function), but I've now fixed it so the generated ids aren't so weird.

Also, the promise of schedule will now contain the (potentially generated) id's (similar to getScheduledIds).

And no, currently there's no way to get the date of scheduled notifications. Perhaps a getScheduledNotifications function can be added, but you might as well remember those dates in your own code.

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

No branches or pull requests

4 participants