Open 84pennies opened 10 years ago
anyone?
Same question here...
Is it possible to use a custom sound when the app is not in the foreground or not running at all.
Hi, have the similar issue, but there's no sound at all when the app is in the background. Can you show me how are you registering for a push notifications?
The default iOS notification sound would work fine for me.
sound : true
Maybe ??? :-)
@OstrichCorpse I am not doing anything differently than the readme instructs. I would take a look at how you are formatting your json payload as that can be a bit tricky coming from the server getting it right.
Any word from the devs about this being a future feature or are we stuck using the stock push notification tone?
Hi....am also facing this issue.i set a custom sound for the push notification and when the app is in foreground the push notification is appearing with the custom sound. But when it is in background state push notification appears silently .I am working in iOS 8. If you people have any idea , please help me .
Thanks in advance
I think the problem lays with the Location of the sound file.
If you want to play it in the background you must use www/sound.wav but in the foreground you only use sound.wav
I was able to get a custom sound file to play on iOS 8 in background by doing the following:
platforms/ios/YourApp/Resources
directoryResources
folder on left paneExample sending using Node APN:
var message = new apn.Notification();
message.expiry = Math.floor(Date.now() / 1000) + 3600; // Expires 1 hour from now.
message.badge = 1;
message.alert = 'Test';
message.sound = 'beep.wav';
apnConnection.pushNotification(message, recipients);
I have this issue in Android, any clue?
For ios you need to 1.include the sound name in the pushed payload 2.drag and drop it in xcode, than add to build targets
@mateuszgwozdz why do we need to add it separately in xcode. Is there any automated way to include a file in xcode.?
When the app is in the foreground, the custom sound plays fine.
When the app is in the background, it uses the default iOS sound.
Is this a limitation/known issue? I have scoured stack overflow and this git and have not found anything. My objective-C isn't good enough to figure it out, so I am asking for a kind soul to help : )
Thanks,
Matt