OneSignal push notification - set on ongoing attribute - push-notification

I have a problem with OneSignal push notifications..
I need to send a notification with the REST API, and that notification cannot be removed by sliding or swiping.
According to the Android documentation the attribute is "ongoing", but in One Signal I can't find that option

Related

Firebase custom notifications with FlutterFire

Thanks to Firebase and FlutterFire, it's easy to send regular notifications from the servers to the users' devices. Those notifications include a title, a body, and an image url. But what about creating a no-that-simple notification, like Telegram's or WhatsApp's?
The simple question is to avoid sending a Notification from the server, and instead set the data field to the push message. But according to the FlutterFire documentation:
Data only messages are considered low priority by devices when your application is in the background or terminated, and will be ignored
So, it sounds like if we want to have a reliable delivery system, we should add a Notification to our push messages. But that notification is so simple. And, again, according to the documentation:
If your message is a notification one (includes a notification property), the Firebase SDKs will intercept this and display a visible notification to your users (assuming you have requested permission & the user has notifications enabled)
So: If I want a reliable system, I have to send Notifications, but I do it, I can't tell FlutterFire to use my custom notifications.
So the question is: how to show custom notifications with FlutterFire?
What I want to achieve is something like this:
I'm going to try setting the priority of the push notification.
You can however explicitly increase the priority by sending additional properties on the FCM payload:
On Android, set the priority field to high.
On Apple (iOS & macOS), set the content-available field to true.
On the server side code, it looks like:
message.setAndroidConfig(AndroidConfig.builder().setPriority(AndroidConfig.Priority.HIGH).build());
message.setApnsConfig(ApnsConfig.builder().setAps(Aps.builder().setContentAvailable(true).build()).build());

Handle Notification data without click on notification in ionic 3 (One signal push notification)

i am using Onesignal in ionic 3. I am getting notification properly when the app is in foreground. When I receive a notification in background i am getting the data in the notification only after tapping the notification. But i want to get the data without tapping on the notification.
You're looking for Silent Notifications (Silent Notifications are background notifications that do not show any message on the device)
Right now, you're likely using the onOpened handler. You will need to set up a service extension and be prepared to have to write native code!
https://documentation.onesignal.com/docs/silent-notifications

background push notification in ionic3

I have completed an e-commerce app in ionic3. The problem is I want user to be notified when new offers or deals are added in our inventory. This should be a backend process, whether or not the app is open or close.
Note: There is no firebase involved.
If you want to use to get notification in same device then you can try Local notification native plugin for notification and if you want to send notification to other device then you have to use Push or FCM or Onesignal and yes this all required firebase to send push notification to generate device id/key.

Firebase push notification message does not upload badge app icon

When my database record is updated on the server it sends a push notification to the Android app user through FCM. The notification is sent but the badge count on the device is not updated. How do I set the notification to change the badge app icon?
In Android this doesn't happen automatically like it does with the iOS implementation. You'll have to handle this yourself by overriding the onMessageReceived method - see https://firebase.google.com/docs/cloud-messaging/android/receive. The badge count can then be updated using something like https://github.com/leolin310148/ShortcutBadger to make things easier.

Android/iOS chat push notifications only displaying first characters

Is there a way to display full chat message in push notifications?
Push notifications are only displaying first few characters of the message on both Android and iOS.
I bet you are using automatic push notifications that were enabled in admin panel. In order to customise push notifications itself you need to create and send pushes by yourself (just disable automatic ones in admin panel).
Here is example on how to do it: http://quickblox.com/developers/SimpleSample-messages_users-ios#Send_Push_Notifications_from_application_.28via_API.29

Resources