Open dhavalmaru opened 8 years ago
@dhavalmaru currently not supported. Pull Requests are welcome.
Request to have + 1.
+1 I'd love to have it also
+1 would be cool to have this
+1 would like this as well!
I'm using the branch v2.0.x
and all I had to do was to add priority
to my data payload like this:
{
data: {
priority: 1
}
}
@akz92 excuse me but where do you put that setting if it's on typescript?? nothing about that is shown in the docs. That's for showing head's up on android right?
@robgaleano you should put it on the data
portion of your notification payload that's sent from (I presume) a web server i.e.:
{
data: {
title: 'Example',
message: 'Example message',
priority: 1
}
}
EDIT: Yes, it's for Android.
@akz92 you mean on back-end side? i thought it was a configuration on front-end
@robgaleano exactly. priority
is set per notification.
@akz92 ok perfect i will try that, thanks a lot! only with that change it will show the notification like a heads-up right?
@robgaleano right, but only if the app is in background. To show heads-up while the app is in foreground you need to set forceShow: true
in the plugin initialization.
@macdonst this is actually already working on the master branch and if needed I could help documenting it.
@akz92 in which version is working? i already have the forceShow attribute set to true i'm using 1.8.4 version if there's a new version could you tell me how to update it?
@robgaleano it works on the newest version (1.8.4). I didn't test on previous versions.
thanks for your help @akz92 i've managed to make it work but for some reason it only shows a heads-up when im inside the app. When the app is in background or foreground it just shows the icon and sounds/vibrate i don't understand why. Any thoughts or suggestions?
@macdonst Set priority: 1 works for me. this issue could close though
I'm using this plugin and adding the priority field with a value of 1 (also tried with 2) and the notification appears but not the head up. It's the same problem whether the app is open or closed. Also tried adding forceShow: true and still the same. Do I need to do anything else to get it working? Thanks!
@Juanpam did you resolve this? I'm getting the same result (v2.2.3).
Hello @roy46. Honestly, I've already forgotten if I did indeed resolve the issue but I think it was due to the specific smartphone I was trying the app on. It had some options regarding the app's notifications configuration. Specifically, the floating notifications were off for my app. I think turning it on fixed the issue for me. Good Luck!
Thanks for the reply. I actually found the solution. The API has a createChannel function for Android where u can set the importance of the notifications on that channel. This value then dictates the head up pop up displaying or not.
Shoukd have read the docs better. Hope that helps anyone else in that same position.
I was only able to get Heads-up notifications to work on Android Oreo by creating a channel with importance: 5
. I'm also maintaining a separate default channel for less urgent messages.
Hi,
I require to show heads up notification like whatsapp does
Is it possible with this plugin?
Example of Heads - up: