how to use "export interface CalendarNotificationTrigger"

@charliecruzan Hey there I just want to update you on the code. I have a test build on my iPhone that is supposed to send a notification every two days.

Last night I kept the app open all night starting at 10 pm; at around 1 am I checked the app and noticed the screen had not updated as expected (it was still showing day from day before). So, I closed the app and opened it again and the HomeScreen updated as expected. This morning I saw a notification! :partying_face:

My question now is: how can I update the home screen without opening the app? or how can I update the data on the home screen without opening the app? Is the best option Task Manager? The docs says

“TaskManager works out of the box in the Expo client on Android, but on iOS you’ll need to test using a custom Expo client.”

When I look at the docs on building a custom Expo client it says:

Push Notifications are currently unavailable with ad hoc clients until we complete our work to add an extra authentication layer to the Expo Push Notification service.

I am trying to send local notifications when the app is not running. I am confused on how to use Task Manager because I don’t see an example that implements ‘background fetching.’ Are there any other examples of implementing Task Manager?

Why do you need to update the homescreen without opening the app?

Yes, the best way to do that is with TaskManager

Hey there.

I need to update the home screen in order to update a variable; the variable is based on today’s date. In my testing my app updates based on the date only when I quit and launch fresh for each day if; If leave the app open overnight it does not refresh at all because the entire interface is based on the variable in relation to today’s date.

Couldn’t you update the variable when the app is foregrounded? AppState · React Native

Thanks again for the quick reply. Yes that could work but I want to be able to send a notification based on a date; and I want to send a notification even if the user has not opened the app for that day. the app should automatically update the date and then trigger the notification based on today’s date.

I hope this makes sense. Basically the notification should be sent to the user even if the user has not opened the app in a long time but the notification is triggered by today’s date in relation to another upcoming day

I see what you’re saying, in that case yeah TaskManager is your best bet or you could send remote notifications from a server based on if your user has opened the app that day

One of the main issues is that the custom expo client build that is required to test task manager does not support notifications.

So your other option about sending notification from a remote server based on whether or not the user has open the app on that day could be useful, especially for testing. Do you have any other documentation on that? is it the same documentation on the notification API and notification guide?

it doesn’t support remote notifications, but I believe local notifications will work on a custom Expo client

Guide to sending remote notifications is in the same group of guides I shared here- Exponent

I looked at the API here but could not find any method based on if user opened device that day.

Can you point me in the direction where this method is (or provide more details)?

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