I want to implement local notifications in my chat app, that whenever User A send message to User B then I want to send notifications,, it is possible to send local notification when the app is terminated,, As you know guys firebase functions are paid so I am trying to work with local notifications...
Thanks in advance
Related
I have flutter app which data ,I will get through api and there list of appointments data with that data I need to remind user by notification so I tried local notification, background fetch in flutter but not working as expected
Any other proper way to remind notification before appointment time like push notification and i'm using backend C# for writing api
Look into https://github.com/winsw/winsw/releases
A wrapper executable that can run any executable as a Windows service.
I had just replaced my app with supabase from firebase in flutter app.
Firebase has firebase_messaging that provide push notification to device token.
Is there any facilities to create function in supabase and send notification to selected user with device token while changing in database.
If yes than please suggest some function else suggest some method to send notification.
Supabase does not provide a mechanism to send push notifications at this point, so you can use FCM or other push notification sending services to send them out to the users.
If you are going with FCM, you can setup your own backend using Firebase cloud functions or other backend service that you prefer to send the notifications from.
Typically, you would want to send push notifications to your users when there is some kind of change in the database, like when there was a new message sent or someone liked a post. You can listen to these events using Supabase database webhooks. With database webhooks, you can send your backend a request whenever you receive certain data change happening in your database.
I'm trying to create a Chat App. When the app enters background and if he receives a message, then a notification must appear.
What I understand is that FIRMessaging.sendMessage() sends something to the cloud. But how the other device is gonna receive it ? It cant be continually looking for messages that are targetted to him...
I would like to understand how to use this fonction and what are the parameters to pass in it. So far and with the current documentation, I couldnt do it.
[[FIRMessaging message]sendMessage:(nonnull NSDictionary *)message
to:(nonnull NSString *)receiver
withMessageID:(nonnull NSString *)messageID
timeToLive:(int64_t)ttl;
What should I put in the receiver ? It's userId in firebase ? or what ?
In the exemples they talk about SENDER_ID + "#gcm.googleapis.com"
which confuses me cause it looks like it's either my Id or the Id of the firebase App..
I cant even figure out if i'm trying to send an upstream or downstream message (dont understand)
Well all I can say is that I really get my head around it...
https://firebase.google.com/docs/cloud-messaging/upstream#handle_upstream_message_callbacks_1
Thanks!
Firebase Cloud Messaging and Firebase Notifications (which is built on Firebase Cloud Messaging) handle this automatically for you. From the documentation of Firebase Notifications:
When your app is in the background on a user's device, notifications are delivered to the system tray. When a user taps on the notification, the app launcher opens your app. If you want, you can also add client message handling to receive notifications in your app when it is already in the foreground on the user's device.
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 was successfully configured push notification and it sends notifications to other users well. However when I want to send a remote push notification to the same phone Im using it doesnt get any. However I know we can use local notifications but due to my requirement it has to be a push notification. Is there any blocking scenario where it doesnt allow the push to come to the same phone?
Thank you