question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

localNotificationSchedule id string or number?

See original GitHub issue

localNotificationSchedule id string or number?

I see in the documentation that the type of id in localNotificationSchedule is number. Cancelling a scheduled notification using cancelLocalNotifications requires a id as a string.

That seems contradictory to create a notification using id as a number, while cancelling the notification requires id as a string. Shouldn’t it just be a string?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

3reactions
Frans-Lcommented, Jan 25, 2021

Thanks @Dallas62 for the quick reply!

Should we rewrite the comment to be something like “//… specified as string or number. The number will be cast string” ?

It would avoid a lot of confusion 😃

0reactions
theneekzcommented, Dec 8, 2021

either string or number will work as long as it is a 32-bit signed int (-2147483648 to 2147483647). I think specifying that it needs to be a signed int is important

Read more comments on GitHub >

github_iconTop Results From Across the Web

number of flutter local notification schedule and a list of ...
I want to know the number of flutter local notification schedule and a list of notification IDs. flutter · localnotification · Share.
Read more >
flutter_local_notifications | Flutter Package - Pub.dev
A cross platform plugin for displaying and scheduling local notifications for Flutter applications with the ability to customise for each platform.
Read more >
How to use the react-native-push-notification ... - Snyk
localNotificationSchedule examples, based on popular ways it is used in ... 32 bit integer specified as string. default: Autogenerated Unique ID ticker: "My ......
Read more >
Local Notifications | Capacitor Documentation
id, number. schedule, LocalNotificationSchedule. sound, string, Name of the audio file with extension. On iOS the file should be in the app bundle....
Read more >
JavaScript localNotificationSchedule Examples, react-native ...
lastId, // (optional) Valid unique 32 bit integer specified as string. default: Autogenerated Unique ID ticker: "My Notification Ticker", ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found