Local Notifications

So I am trying to figure out a solution for delivering notifications to a user. I have a scenario where I want to send a notification at the same time each day but only if a boolean value is true (the boolean value in this scenario is checking to see if it is a weekday or not). I have set up push notifications for my app using OneSignal but their automated/scheduled notifications do not have enough customization (from what I understand, I may be incorrect) for my liking. I have tested local notifications and have had them run successfully but I am a bit confused how I could implement a process with local notifications that it only runs if it is a weekday. 

Any suggestions?

Its just a matter of computing a date in the future and setting a notification for that time. Do you want to set a bunch of notifications or do you want to set one for the next day if it’s a week day (or Monday if it’s a Friday)? How you do it depends a lot on how far in the future you want to set them.

Keep in mind, local notifications return a data type called “userdata” which is a reference to a block of C memory. You need this data to cancel a notification. Once an app exits, you can’t cancel notifications that were set and haven’t triggered yet.

Using push notifications keeps things on a server where you don’t have to depend on if the app is running (in the background) or if it’s exited.

Rob

Its just a matter of computing a date in the future and setting a notification for that time. Do you want to set a bunch of notifications or do you want to set one for the next day if it’s a week day (or Monday if it’s a Friday)? How you do it depends a lot on how far in the future you want to set them.

Keep in mind, local notifications return a data type called “userdata” which is a reference to a block of C memory. You need this data to cancel a notification. Once an app exits, you can’t cancel notifications that were set and haven’t triggered yet.

Using push notifications keeps things on a server where you don’t have to depend on if the app is running (in the background) or if it’s exited.

Rob