Flexible repeat for local notification scheduling


I need to enable user defined repeats for local notifications, for example reminders for pills every 12 hours, or every 2 days. Currently it is not possible because schedulingOptions param for function scheduleLocalNotificationAsync takes only string repeat with options: ‘minute’, ‘hour’, ‘day’, ‘week’, ‘month’ and ‘year’. There is no way to specify the amount of that repeat interval - for example 5 hours.

Is that something you can add to a future release?

I went through the code for android (https://github.com/expo/expo/blob/master/android/expoview/src/main/java/host/exp/exponent/notifications/NotificationHelper.java) and I think it would be easy to add an option for the repeat amount. Unfortunately, I do not speak objective C so I am unable to create a complete (android & ios) pull request with that change, only android.
Considering there are other android only features in notification api, maybe that is ok? Please let me know and I will create it.

I really think expo is a great library and did not have issues with it, but because of this little inconvenience I will be forced to detach :frowning: Please help

We’d accept a PR for only the Android part as long as the docs are clear about that. It’d probably be good to chat we me in Slack (@jesse in slack) before you start working on it. Thanks!

1 Like

Any update on this? I am looking forward to this feature as well

It got merged! https://github.com/expo/expo/commit/99d711d80eaf12e798fb6f1523e549fde5cb2e95

The docs weren’t updated in the PR but it should work now.

Docs are updated :wink:

@jesse or @lvojnovic any suggestions on how to achieve this same functionality for iOS?

this link is not valid. please update it. i still have this issue