subharb
subharb

Reputation: 3472

iphone - How does Whatsapp separate notifications?

Im about to develop notifications for my app. In whatsapp you can receive group messages or single messages, and you are able to block one or the other type of notifications with in the settings of the app, not in the general settings of the phone, where you can disable any notifications.

My app will receive different types of notifications, the user should also be able to block notifications of one type and enable others.

What I don't understand is how my app or whatsapp is able to distinguish the different types of notifications, from what I know the notifications are handled by the iOS, so could you explain me how this can be done?

thanks

Upvotes: 0

Views: 1388

Answers (2)

Anton
Anton

Reputation: 31

add a type field in the dictionary. then have a bool key for each field in userpreferences for example

then once you have recived the push pull the type field and check the bool in settings if YES or setting for that key is missing process the notification in the app.

if user opted out of that subtype of notification then don't do much, maybe just update badges (if any). but don't pester user with any other disruptive in app navigation, etc

obviously you have to build a table view controller to allow user select which subtypes of app-specific notification she should be bothered with (probably opt in by default for most of them)

Upvotes: 0

mattjgalloway
mattjgalloway

Reputation: 34912

I assume you're talking about push notifications, so:

They'll be being "blocked" on the server. i.e. the server will only be sending out notifications for the types that you've chosen. You can't do it in the app.

Upvotes: 3

Related Questions