I am making an application using flutter so every teacher has some students in their class so they see their students only in the first screen , I want to send to the teacher notification before each student birthday by 2 days , also i want to send a notification at the beginning of each month (day 1) with all of the birthdays of the students at this month ..
ex: Mark birthday is on 5/9 , Thomas is on 19/9 so i want to send the teacher a notification at day 1 of the month that there is 2 birthdays on this month for Mark and Thomas .
I've searched alot really and i can't do anything .
You have to implement Firebase Messaging or One Signal and need to send notification from the server. You can generate FCM token and then send it to specific devices. Using Pubsub in Firebase Functions you can check daily notification and check if any birthday is coming after 2 days of the following day. If there is Birthday then it will send the notification to the user using the FCM token registered. Here are some resources:
Flutter Firebase Notification using Firebase Functions
Schedule Function using Pubsub and Firebase Functions
Related
I have a variable called week. Week value changes with Time. I want to show the background local notification according to week.
e.g Current week is 1. so the notification I want is you are in week 1 etc... Even when app is not open
OneSignal: is a free push notification service for mobile apps. this package self-serve customer engagement solution for Push Notifications, Email, SMS & In-App.
dependencies:
onesignal_flutter: ^3.4.1
I'm working on an ionic project.
If users don't open the application for a long time after downloading my app, I'd like to send them local notification.
For example, I will send a notification if it does not open for 3 days. But I couldn't figure out how.
Can you help me?
You can use the following to send notifications from server:
Create one table in your database to track user activities.
Add columns as userId, lastActivity to store the time of the user's activity.
Update the lastActivity column whenever the user opens the app.
Write one scheduler which will run at a specific time every day.
In the scheduler write a logic to get data from UserActivity table and compare the time stored in the table with your current time.
If the time difference is greater than 3 days then send a notification to that user.
For local notifications here is a way:
Whenever user open's the app schedule the local notification of after 3 days from current date. ( Make sure to remove previously schedule notification before adding new one. )
In this case if user open the app notification will reschedule automatically else notification will fire based on last schedule of it.
You can create a system in which you track user like ,
if user's opens your App then you must update true value for that user with time in your database and now you can compare current time with user's time value and if its more then 3 days you must send notification to that user.
I am creating an app using Swift and Parse as my backend platform. In my application a User can send an invitation to be connected to another user and as soon as they are connected the app should send notifications to remind the user about his friend’s birthday.
In this scenario I have two moments in which the app should send a notification:
1- When user A sends an invitation to user B, user B should receive a notification
2- When it’s user’s B birthday, user A should receive a notification and vice versa
I created a Parse object called AppNotification that is responsible for storing information about the notifications the user should receive. So when a user sends an invitation to another user I am adding a line in the AppNotification table, the same happens when it’s a birthday of a friend. Using this I can calculate the number of unread notifications and show it to the user in the UI using the components badge.
My question is more related to the best way to send the birthday notification. What I am considering is:
1- When user A sends and invitation to user B I have to send a push notification to user B.
2- As soon as the users are connected I can schedule local notifications to remind them about the birthday. This solution would use Local Notifications instead of Push Notifications.
3- Or create a Job in Parse that will be executed every day and will read all the users whose birthday is today and send a push notification to his friends. This solution would use Push notifications and I would not need to worry about scheduling local notifications.
Between the points 2 and 3 which one is the best solution? Is there any other approach I could use? When should I consider using Local Notifications other than Remote Notifications?
Thank you in advance.
Regarding points 2 and 3: there are pros and cons for both options: Having the reminders as local notifications is basically what your local calendar app does, i.e. you don't need a connection the Internet / Parse. However: what happens if one party (A) decides that she no longer wants to be a "friend" (of B)? Should notifications still be sent? If not, you could easily delete the scheduled notification on the server. This would also ensure that the other party (B) wouldn't receive notifications of a former friend (A) if she didn't open the app in the meantime and synced the list of friends.
There are of course more pros and cons, so it is really a matter of your preference and possibly other constraints (e.g. should an active internet connection be necessity?).
I am creating a reminder application that will allow users to remind user to send sms or email. at any day in the future.For example a user wants that the app reminds it for the birthday of a friend in the future.So the app would remind the user that day and show the user some prestored text to send as sms or email.
Can you suggest a good way to schedule these reminders for my app?
One of the ways I came up with was to schedule local notifications each day but I don't know if that would work.
In my application, the user chooses a day (monday-sunday) to set an alarm for and the application sets up a local notification to repeat weekly on this day. How can i get my application to create a looping weekly notification for this day of the week every week?
Use EventKit to create a recurring event.