Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sound name to remote notifications for iOS #7

Open
Fenrikur opened this issue Jul 28, 2017 · 4 comments
Open

Add sound name to remote notifications for iOS #7

Fenrikur opened this issue Jul 28, 2017 · 4 comments
Assignees
Labels
enhancement Improvements to existing features with relevant impact

Comments

@Fenrikur
Copy link
Member

In order to be able to play custom sounds on iOS devices, the FCM push notification should have the "sound" key of its "notification" property set to "notification_default.caf".

Example for event type announcement:

{ 
	"data": {
		"event": "announcement",
		"announcement_id": "i-am-an-announcement-uuid"
	},
	"notification": {
		"title": "Fancy Notification",
    		"body": "This is a very fancy notification!",
	    	"sound": "notification_default.caf"
	},
	"content_available": true,
	"priority": "high"
}
@Fenrikur Fenrikur added the enhancement Improvements to existing features with relevant impact label Jul 28, 2017
@Fenrikur
Copy link
Member Author

Forgot to mention, that announcement was only intended as an example.
It would be great to have notification (for private messages) follow the same pattern. Also including (if the notification banner should be more informative than "New Private Message") an appropriate title and body in the notification object.

(The sync object should of course stay as it is, without any notification part, to keep it silent and background-y. (: )

@Fenrikur Fenrikur reopened this Jul 29, 2017
@Pinselohrkater
Copy link
Member

@Fenrikur Should the sound property for notification(private messages) also benotification_default.caf` , or something else?

Also, it is by design that the body/title payload does not contain the actual private message, but just a link to the app - we want to track who has received/read them, and not 'leak' any information through the notification.

@Fenrikur
Copy link
Member Author

Fenrikur commented Jul 30, 2017

All remote notifications, which should not be silent per se, should use notification_default.caf, as it is an alias that will be mapped to the selected sound locally. Right now, we do not differentiate between announcement and notification content types, when it comes to sounds.

What do you mean by 'link to the app'?

@Pinselohrkater
Copy link
Member

Link to the app not as in "link as payload" but as expected behavior. The notification should just open the app, where the user can then get more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements to existing features with relevant impact
Projects
None yet
Development

No branches or pull requests

2 participants