Local Notification trigger daily

Please provide the following:

  1. SDK Version: 38
  2. Platforms(Android/iOS/web/all):

Hello,

I am trying to implement a local notification. I want to set this up so it triggers everyday at 10.P.M. So I did the following.

const identifier = await Notifications.scheduleNotificationAsync({
      content: {
       title: "I'm Scheduled",
        body: "Wow, I can show up even when app is closed",
      },

      trigger: {
        hour: 21,
        minute: 00,
        repeats: true,
      },

Is this the right way to trigger a daily local notification.  I am trying to follow the docs in [Notifications Document](https://docs.expo.io/versions/latest/sdk/notifications/)
2 Likes

I’ve been struggling with local notifications for 3 months. Could you let me know if you have any luck?

See my post here: how to use "export interface CalendarNotificationTrigger" - #10 by charliecruzan

Not really. I have been trying to get it to work for quite some time too. I went to the previous version of notifications. I got it to work not perfectly but at least I got some sort of notifications - https://docs.expo.io/versions/latest/sdk/legacy-notifications/#localnotification. It worked for two days but suddenly it stopped today. Not sure why. I had to convert the time to seconds and then use it.

I have been facing the exact same problem. The local notifications seemed to work when I upgraded expo SDK from 38 to 39 but then the apk file has been crashing so I had to revert back to sdk 38 and now I am trying to find a way to make the notifications work :frowning:

I realized that notifications are not received on expo client using sdk 38, but they work perfectly fine in deployment.
You receive notifications on expo client when you use sdk 39

Hey there thanks for the quick response.

Would you mind sharing your source code?

I am working on open source app and I would be happy to share with you as well; in fact that link is already available in my other forum posts.

I also have another doubt. How do you debug a notification. Say the user does not receive a local notification in his phone then how do you debug it. I know how to debug in my phone but I am not sure how to do that in someone else’s phone. Is there a log file I can look at that I am missing. I am very new to mobile development so would appreciate any help.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.