-
-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to send push notifications while the app is not open? #89
Comments
Hi Daljit ,
Definitely it is possible. As a matter of fact the notifications arrive in
the notification tray only
when the app is in background. If it is in foreground the app directly
receives it and there is
no notification generated in the tray or notification area.
It is also possible to "embed" a payload with the notification and extract
it in the Qt App.
which in turn can be used to open a specific landing "Page" in the App when
the notification
if clicked in the tray.
regds
mallah.
…On Sun, Aug 26, 2018 at 5:53 AM daljit97 ***@***.***> wrote:
So I would like to send a custom notification using Firebase (like for
example an update in my app) so that when the user can click notification
in order to open the app. With QtFirebase is this possible? Can an app
receive notifications even when closed? Reading on the Firebase docs it
seems possible, but I am not sure about QtFirebase.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#89>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHHZuWvNp41QviVMfWAmaAfPRcyV7YX6ks5uUeqVgaJpZM4WMlcr>
.
|
|
Hi Daljit , Yes The notifications are received by the Firebase Services
that are independent of your App. Even if your app is *completely* closed
the FireBase receives the notification based on fcm_token or any kind of
targeting. The Firebase console provides a way to test
all these. Using fcm_token to target the device is a easy way.
|
@rmallah one last question before I close this issue, how I can set up a custom icon for notifications received when the app is closed? |
Ok I figured that the way to set up a custom icons is exactly the same as on Android Java and modify the manifest file(for Oreo you also need to configure Notification Channels). |
@daljit97 I'm glad you finally got it working. Have you documented the process? If so you're more than welcome to leave it here for future users! (The custom icon part) |
@larpon sorry for the late reply. I mentioned my problem here on stackexchange The issue was that I was testing the application on Android 8.0 Oreo. From this version of Android, Google requires that application make use of Notification Channels and applications are required to create a default Notification Channel. So I added the following code to the main activity of my application in the
Then added the default notification id in the manifest file:
|
So I would like to send a custom notification using Firebase (like for example an update in my app) so that when the user can click notification in order to open the app. With QtFirebase is this possible? Can an app receive notifications even when closed? Reading on the Firebase docs it seems possible, but I am not sure about QtFirebase.
The text was updated successfully, but these errors were encountered: