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

How can I play a specific sound? #111

Closed
Tzikas opened this issue Sep 10, 2015 · 6 comments
Closed

How can I play a specific sound? #111

Tzikas opened this issue Sep 10, 2015 · 6 comments

Comments

@Tzikas
Copy link

Tzikas commented Sep 10, 2015

Is there a way to play a specific sound. I saw this topic in a previously closed issue, but it didn't seem resolved. I have a default sound playing, but I want to pick a sound. In my config.push.json:
{
"apn": {
"passphrase": "!",
"key": "**
",
"cert": "**
"
},
"apn-dev": {
"passphrase": "**
",
"key": "**
*",
"cert": "**
*****"
},
"production": false,
"badge": true,
"sound": true,
"alert": true,
"vibrate": true

On my server file:

Push.send({
from: 'push',
title: 'Hello World',
text: 'This notification has been sent from the SERVER',
badge: badge,
payload: {
title: 'Hello World',
historyId: result
},
query: {},
sound: '../public/sound.mp3'
});

@Tzikas
Copy link
Author

Tzikas commented Sep 10, 2015

Use www/application/public/sound.mp3 from #36, and MAKE SURE IT"S NOT TOO LONG OF A SOUND or it will default, and ruin many hours of your life.

@Tzikas Tzikas closed this as completed Sep 10, 2015
@guilhermedecampo
Copy link
Collaborator

Thanks for that! =)

@kylepierce
Copy link

What sound length is too long. 1 second? 2? 5?

@Tzikas
Copy link
Author

Tzikas commented Sep 23, 2015

I think its about 40 seconds, but you can find out in apple's push notification docs

@kylepierce
Copy link

I would immediately delete any app had a push notification sound longer than 10 seconds. Thats crazy lol

@mvgalle
Copy link

mvgalle commented Nov 24, 2015

Please see my solution here: #9 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants