Schedule local notification every x day of the week - React native & Firebase - react-native

I am using react-native-firebase to schedule local notifications every day at a certain time. However, I would like to allow the user to decide when to receive the notifications in a given week.
For example, he could set notifications from Monday to Friday and not receive any on Saturday and Sunday. Currently, I am only able to set a repeatInterval property to 'day' but am struggling to implement the mentioned feature. Any ideas?
(Yes, this could be done with FCM and a server, I am just asking if this is possible locally in RN)

Related

FCM recurring notification not work on second day

I have implemented the FCM in my react native app and it works perfectly with instant and schedule notification.
However, when I create a recurring notification in FCM console, the notification only able to send on the first time but not the second time and after it.
For example, the recurring notification start on today, 12.00PM and it should be repeat every day 12.00PM. Yes, today 12.00 PM the notification sent and recevied by the device. But on second day and the day after it, the notification not sent and not received by the device.
Could some help me on this?
you should change the scheduling option like this picture, in the custom option, u can use every 1 day and don't use daily option

Can you apply time restrictions for ibeacon notifications when exiting a region?

I have implemented iBeacon into an app so that it will wake the app briefly from a suspended or killed state. A push notification is sent which would prompt the user to open the app if they wish to.
The problem is, when a user exits then enters a region again another notification is sent. In a shopping mall for example a user could walk past many beacons (enter and exit regions). What they probably will not want is lots of notifications annoying them.
Is there a way that you can control or restrict the number of notifications a user gets? For example time restrictions? Once a notification has been received then a user would not get another one for 15 mins or 30 mins etc?
There must be a solution as i am sure Apple would not want users to get lots of notifications that users dont want.
There are no built-in tools to iOS SDKs to prevent multiple notifications from being sent in a specific time period. But you are correct that this is a very common problem. The solution is to just add a little bit of programming logic.
Here is a typical approach:
Each time you send a notification, record a timestamp of when you sent it. Store this in the phone's persistent storage, so even if a user restarts the app or reboots the phone you will have a record of when the last notification was sent.
UserDefaults.standard.set(Date().timeIntervalSince1970,
forKey: "lastNotificationSentTime")
Before you send a notification, check to see when the last time you sent one was. If it was too recent, suppress sending a new notification.
let lastNotificationTime = UserDefaults.standard.value(forKey: "last") as? Double ?? 0.0
if Date().timeIntervalSince1970 - lastNotificationTime < 60.0 {
print("Not sending notification because I just sent one in the last 60 seconds.")
}
else {
// TODO: Send notification here
}

Firebase console cloud messaging - server time not recipient

I used to use the firebase console to send noticifications for a game app, and a little while ago, when I chose "scheduled" option and choose a time, the time will show as fixed depending on the machine timezone (e.g. +3:00 GMT Guatemala Time Zone). Now, the only option is "Recepient time zone" (see image below).
Does "Recipient time zone" mean if I choose 5 PM, it will be delivered to the end user at 5 PM his time? while it might be 7 for example on the server time and the notification was supposed to be sent two hours before that?
And if so, then how can I send it at fixed time on a fixed timezone like it used to be regardless of end-user timezone (I want to send a notification when the game is live which is 5 PM on the server, but clients might have different timezones so the notification will mean nothing if received earlier or later)?
For one-time scheduled delivery of notifications, the Firebase Cloud Messaging console has two options:
You can deliver the message at a fixed point in time to all your users, regardless of their timezone.
Say you set the message to be delivered to everyone at 7:30 am Pacific Time. Because I'm based in that timezone, I would receive it over morning coffee. But a friend in Holland would receive at at 4:30 pm their time, since they are 9 time zones ahead of Pacific. But if we'd pick up the phone and call each other, we'd both have just received the message at the same time.
You select this option by picking a specific time zone in the delivery time zone popup.
You can deliver the message at a specific time, according to their configured timezone.
Say you set the message to be delivered to everyone at 7:30 pm in their local timezone. In this case Firebase tries to deliver the message at the same local time to each user. So my Dutch friend would receive the message at 7:30 pm, about 3 hours from now. I would also receive the message at 7:30 pm my time, about 12 hours from now.
You select this option by picking Recipient time zone in the delivery time zone popup (it's at the top of the list).

Can i change the time between notification emails for customer APS Updates?

I'm running a dedicated server and i like that my customers receive these updates from plesk 12,
But they receive an email every day.
Is there any way to make it so that they only get updates once a month?
I know i can disable/enable them via "Tools & Settings - Notifications" but i want to change the regularity of them.
APS updates notifications are sent as a part of Daily Maintenance task so it is not possible to modify the period.

IOS : Push notification on user defined time duration

My app should get push notification on user defined time duration (like on each Monday 11 AM).
So for that App have to check for new updates on server (on background) on user defined date and time, App might not be running at this time, but it still has to check for new updates on server. If any update found, server will send push notification for the same.
How can I implement time based background process?
Thanks!
Why don't let the server do all that? I mean, you will have to do a post with the selected date by the user from the app, and the server at the selected time will send a push notification to that particular user (you know what user it is by his token id). Amazon Web Services works like that for example.