notification don't pop up in flutter onesignal app - flutter

Hi I Have a problem with onesignal
I am using API to send a notification when the user adds something in-app, everything is working perfectly but when he received a notification it doesn't pop up, after some research I found I have to add priority when sending it in API, I tried like in image 1 and 2, but it doesn't work, I tried to add android channel id like in image 3 and 4 but I did not work too, so can anyone tell me how to make this notification pop up when user receive it and thanks
1
2
3
4
tried to add priority and channel id in api body but it did not work

Related

How to receive email notification using IFTTT on React app and ThingHttp?

I have followed this link below to configure my own React App using IFTTT and ThingHttp, the unfortunate part i want to receive an email notification. Currently my channels only show last Ran on all React App and non of email notification are sent to me. What could be an issue to my configuration and stuck now?
https://www.elecfreaks.com/store/blog/how-to-send-temperature-threshold-value-alarm-email-via-ifttt.html
I made some relook and found out that problem was on my side. Meaning the naming conversion was on the lower case instead of Upper Case. E.g temp_critical(name of my webhook and reactapp) instead of Temp_Critical(name of my webhook and email/reactapp, thinghttp). I was able to get an notification if my temperature was critical.

How to send push notifications in swift 4 when something happens?

I am creating an app in Swift 4 and I want it to send a push notification when the wind is above a specific value. I already have the app created and when you open the app you can see the current wind (scraped from a website).
Is it possible to send a message when my phone is turned off and the app isn't running? and how to do that?
You need a server to send push notifications when your phone is turned off.

Flutter and Onesignal, hide notification

I'm having a chat in my app with notifications about new messages being shown and I'm using OneSignal for this.
However if the chat is with the person and the notification is about the chat open at that moment, I'd like it to hide the notification (not completely mute though as I'm using it for the chat messages being added into the conversation as well).
Is this doable or do I have to do for example save the open chat into the database, then check whatkind of notification is to be sent based to the open chat? (which would of course cause many kinds of issues if the user just simply closes the app)
Should I somehow edit the state of:
OneSignal.shared.setNotificationOpenedHandler((OSNotificationOpenedResult result) {
}
Or is there another trick into this to achieve it?
I know this is an old question but if you do this: -
OneSignal.shared.setInFocusDisplayType(OSNotificationDisplayType.none);
after you've initialized OneSignal it should do what you want

iOS: Notification Badge Number does not reset

I want to reset the notification badge number whenever the app is opened. This works perfectly fine calling
application.applicationIconBadgeNumber = 0
UNUserNotificationCenter.current().removeAllDeliveredNotifications()
However, when I one ore more new notifications come in, the icon badge number again goes to 42 no matter how many notifications come in.
Does anyone know how to fix this?
You can follow one of the following for achieving this,
You can store notifications received in your database and when user opens app, you can get the count of unread notifications and update the count.
If you are targeting single users then, you can get the delivery of Push notifications using https://stackoverflow.com/a/50044201/5084797 and then when the notification is opened you can pass notification Open event to server. So the next time the server sends push notification, they can just check for the difference in Deliver and Open and send that count in badge. If user has cleared all notifications from Notification centre without opening them. In that case as soon as App opens you need to update that at server, Else you might be getting wrong count from server.

add notifications to notification center panel

I have an iOS 5 pager application.
Application can receive new message counter from server.
For example application received 5 as a response from server.
So no I need to create new (or update existing) notification in notification center panel
and additionally I need the notification center to receive these notifications while the application is in background.
Help me please. How can it be done?
All of the information you require is in Apple's iOS Developer docs: About Local Notifications and Push Notifications
You also might want to look into the introductory video from WWDC2011: Using local and push notifications on iOS and Mac OS X