最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

react native - How to implement offline reminders in Expo without Firebase? - Stack Overflow

programmeradmin2浏览0评论

I'm working on a Special Reminder project using React Native + Expo ~52.0.36.

I store reminders in JSON format, which should trigger at:

[
    {
        "clock": 3,
        "endDate": "2025-03-22T13:32:01.953Z",
        "weekDays": [
            "5",
            "2",
            "4"
        ]
    },
    {
        "clock": 6,
        "endDate": "2025-03-22T13:32:01.953Z",
        "weekDays": [
            "5",
            "2",
            "4"
        ]
    },
    {
        "clock": 12,
        "endDate": "2025-05-31T13:14:00.521Z",
        "weekDays": [
            "all"
        ]
    },
    {
        "clock": 0,
        "endDate": "2025-05-31T13:14:00.521Z",
        "weekDays": [
            "all"
        ]
    },
    {
        "clock": 10,
        "endDate": "2025-05-31T13:13:16.141Z",
        "weekDays": []
    },
    {
        "clock": 10,
        "endDate": "2025-03-15T21:37:40.111Z",
        "weekDays": [
            "all"
        ]
    },
    {
        "clock": 22,
        "endDate": "2025-03-15T21:37:40.111Z",
        "weekDays": [
            "all"
        ]
    },
    {
        "clock": 10,
        "endDate": "2025-03-22T20:14:53.401Z",
        "weekDays": []
    },
    {
        "clock": 10,
        "endDate": "2025-03-19T22:15:41.959Z",
        "weekDays": [
            "all"
        ]
    },
    {
        "clock": 22,
        "endDate": "2025-03-19T22:15:41.959Z",
        "weekDays": [
            "all"
        ]
    }
]

A specific time (e.g., 22:00).
On specific weekdays (e.g., ["5", "2", "4"] or "all").
Until a specific end date (e.g., "2025-03-15T21:37:40.111Z").

Requirements

  • The app should work offline
  • No Firebase or third-party cloud services
  • No OS permissions required for notifications
  • Cross-platform (Android & iOS)
  • The app should run on Expo Go or Expo Development Build (I can't build with Android Studio, welcome to Iran)
  • A high-volume sound is enough to remind the user (I need for a pop-up But that's OK).

What I've tried

  • Expo Notifications + CalendarNotification → Works only on iOS, but it's just a notification.
  • Expo BackgroundFetch + TaskManager → Should I use this to schedule reminders daily and run in the background?

What's the best approach to achieve this in Expo without OS permissions?

发布评论

评论列表(0)

  1. 暂无评论