I am working on an iOS app in Swift and Firebase as Realtime DB.
Its an app that sends motivational quotes to users via Firebase Push Notifications. Currently, I am using Firebase Compose message to send notifications.
Using firebase is there a way in which Users can specify what time of the day they want to be notified?
e.g. Daily once - 12PM; Daily twice - 12PM, 8PM.
I am using Cloud Functions to get the user details required for sending notifications and triggered them with cronjob.
Related
We are able to send currency via the Custom data parameters in Firebase Cloud messaging (see SS below).
But if the user does not tap the notification "YOU RECEIVED 15 FREE GOLD!" then Firebase.Messaging.FirebaseMessaging.MessageReceived is never fired and the user never gets their currency. So the user may see the notification, and then be disappointed the next time they open the app and there is no gold.
Is there a way in Firebase to compose the notification so that the notification can be accessed even if the user did not tap the notification to open the app?
Without tapping on notification your application not launch and custom data you sent through notification is not received to the application. So sending custom data through firebase push notification is wrong choice in this scenario. You should sent custom data whatever you need through API is always good choice. You can also use firebase database and in that you can send custom data using nodes for respective user.
What I want is to send an automated push notification to users once a day, and have found a way to do this with automated notifications with OneSignal. The problem is that it asks for a title/message to input on their console, but what I wanted was to have a backend (haven't chosen yet, probably Firebase) with some strings, and each day a string will be randomly chosen and that will be automatically pushed to all of my users. Is there a way to do this with OneSignal, and if not with some other push notification service?
Can I accomplish this with the OneSignal API, or should I write some custom script and host it somewhere (like cron) that sends these using API calls?
thanks
I would like to send a notification in every state (app in background or running) when some data in firebase are changed the database. Do I need to use push notification from firebase?
I use the xxx.keepSync(true) to sync with the firebase db. May I use this detect the change and how can I send the notification in the status bar?
You can use firebase cloud functions.
Refer to firebase documentation for details.
I have set up push notifications in my app using firebase. My question is how do I retrieve all the notifications I have previously sent so I can display them in an iOS app. Is there a firebase API for this? I have looked through the firebase documents and don't see any API for retrieving notifications.
There is no API for this, you can use Firebase Analytics however to log events when incoming messages are opened.
I am create a firebase based chat application for iOS. One of the features is to send push notification to the users in the same chat room (if they are offline).
I can't find a firebase function (for iOS) that can be used to send push notifications to the user.
Is it possible?
Displaying alert badges and notifications on iPhone applications is accomplished through Apple's Push Notification system. Since the application is not running on the user's phone when they receive notifications, the APN will have to be triggered from your server-side code.
You'll probably want to create a server-side module that listens for changes to your chat Firebase. When a message appears for a user that is offline, you'll have to schedule a remote notification with the APN. That latter part has nothing to do with Firebase, but has extensive documentation on Apple's developer web site.
I'm not sure if a web application can display alerts or badges. Otherwise this approach will only work if you create a native wrapper for your Firebase chat application.