push notifications: sounds and badges - iphone

I'm working with push notifications and i have a doubt: if in my script (server-side) there are badge and sound, but the user set sounds and badges off... what happens?
I mean: i need to register in my database every setting for every token, or i send the notification and the iPhone does all the work? :)
Thanks!

You don't need to worry about the user settings. The user will receive the alerts he allowed. So if he doesn't want to have the sound and he switch it off. You can still send it and he just receive the alert and or badge...

If the user switches off a particular notification type in user settings, such notifications are not received by the application. For example:- lets say I registered for sound and badge notifications but I disabled the badge notifications in user settings, the application will only receive the sound notifications from now until I enable the badge notifications in user settings or register again for alter notifications too. Re-registering for badge notifications wont enable the badge notifications since they are disbled in user settings.

Related

How to disable and enable notification in an app?

I want to make a Focus Based App where once the user enters in the Focus Mode, no social media notification or any kind of notification will disturb the user.
Please help me.
I think by notifications you mean FCM notifications, if that is the case you can simply make a switch that will add/remove FCM token from the backend.
For more info you can check the Firebase messaging package on pubdev

flutter notification chat quick reply

i have an application which is working fine. i add chatting to the app with notification. Any time users are chatting it send notification both in foreground and background.
my question:
how can i add notification reply just like WhatsApp. if a user send me message and i get the notification, i should be able to reply from the notification without opening the app.
Thanks
Have a look at this package: Awesome Notifications. It is still under construction but it will enable you to display custom notifications including a TextField that you can show when a real Push Notification got received.

Ionic 2 How to store Push notification in Notification board

I have an app that can receive several notifications at the same time.
I'm able to receive all of them (by setting style as inbox) but the issue is that when the user click on one notification, the app is opened and ALL the notification disappears... Is there a way that the device can keep the OTHER notifications in the notification list until the user click each of them?
I saw this working in other apps, but I'm trying to do it with Ionic2.
Thanks!

phonegap ios) is it possible distinguish push notification that user clicked?

I am using phonegap push notification plugin and all seems work fine. push comes without any problem.
But the problem is there is nothing I can do when app is back-grounded.
multiple push notifications can arrive when app is backgrounded. I can not expect which push
notification user going to click. Whatever notification user clicks, app will be resumed without
information of user selection. I have to trigger different events depanding on what nofitication
user selected. I need to know what notification user selected when app is resumed but don't
know how to... seems very tricky problem. is there anybody had same problem?
how did you guys handle this problem?
any help will be appriciated.
never mind...
I thought window.plugins.pushNotifiction.getPendingNotification would return all pending
notifications which arrived while app is background.
But getPendingNotification function only returns the notification that user selected on
notification center or mobile screen.
well... seems nice..
you can`t get all notification information which fire during application is off or app. is in background but, you can fetch user info shortly receive notification in native iOS app.
please follow this application:didFinishLaunchingWithOptions.
At first call of launch you can check for options and retrive the user-info.
for more info refer above link.

iPhone local notification in different application states

I'm using local notification in my app but have a problem handling them correctly.
When app is running, and active, in didReceiveLocalNotification I can fetch user settings from NSUserDefaults and handle the repeating notification, and cancel it if fire date isn't the day it should fire, or show an alert if it's correct date.
However, when app is running, but inactive, the notification will fire although it shouldn't.
Same thing when app is not running, the notification will fire although it shouldn't.
Question
When app is not running, and when app is inactive, how can I access NSUserDefaults and cancel the notification before the alert show up?
Edited answer
The reason I had to ask this was because of bad app design and logic. I tried to set repeating local notification no matter what settings user has set and access NSUserDefaults in it although I should have access user settings first in app itself and then set notifications accordingly.
You can't. a UILocalNotification is handled by iOS and not your app.
Only when your app is active the notification get directly pushed to you app.
In all other cases the os will just show the notification.