Open ppetree opened 7 years ago
@ppetree when you receive a push on Android what do the logs say. Run adb logcat | grep PushPlugin
and send your push message.
Also, did you try a mp3 file? IIRC wav may not be supported on Android.
.wav is accepted everywhere finer sounds are played... ;-) Seriously, every piece of documentation out there says that .wav will work on both platforms. I can try .mp3 tomorrow.
I had ADB installed on my old laptop (circa phonegap 1.6) but on this new laptop I just have XDK. I can try to download ADB this weekend....
.mp3 produced no sounds... same results as .wav
ppetree, were you able to solve this? Where do you save the file. I am trying with .wav and .caf but it doesn't work. What's your payload? Thanks
@acessoftware First, ignore all the documentation... when it comes to GCM/FCM it's either wrong, misinformed or there's a secret that the authors are failing to share with us mere mortals.
Second, mine is working on GCM/FCM. I've no clue what other push providers are doing so these instructions really only apply to GCM/FCM.
Third, I wrote a little javascript (here on github) that allows you to take over console.log and output your payload to a div. This is incredibly useful for viewing the various states of the push (you'll see lots of differences between GCM and what the docs say) or doing untethered field debugging.
The Payload: The iOS payload MUST contain the sound file extension, the android does not contain the extension. The iOS payload uses "sound" while android uses "soundname"
If you look inside your .ipa (rename .ipa to zip) your structure looks something like this: Payload/AppName.app/
In the AppName.app folder you'll fine all of your splash screens and icons, you should also find your custom sound files.
My files are .wav, 32 bit stereo, 44100hz and play on both iOS and android devices.
Depending on your build platform on how you get the sound files into that location. I was using XDK (now deprecated) so I built a custom plugin to copy the sound files. If you don't know how to do this, tag me back and I'll post the code.
HTH!
I am having the same here; however, in my case, the android custom sound works fine. In iOS, it fails.
If using GCM or fire, try specifying the sound file extension on the iOS push notification (opposite of docs)
Also, the location of the sound files is different than specified in the push docs.
Sent from my iPhone
On Aug 10, 2017, at 7:50 PM, Hamza L notifications@github.com wrote:
I am having the same here; however, in my case, the android custom sound works fine. In iOS, it fails.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
I am using APNS to send notifications in iOS. The docs say that you need to include the file extension and I already specified it (it didn't work either). However, can you let me know more about the file location ? I put it in the root folder, it didn't worked.
Le 11 août 2017 à 02:21, Phil Petree notifications@github.com a écrit :
If using GCM or fire, try specifying the sound file extension on the iOS push notification (opposite of docs)
Also, the location of the sound files is different than specified in the push docs.
Sent from my iPhone
On Aug 10, 2017, at 7:50 PM, Hamza L notifications@github.com wrote:
I am having the same here; however, in my case, the android custom sound works fine. In iOS, it fails.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Expected Behaviour
Play a custom sound (default sounds work just fine).
Actual Behaviour
iOS plays default sound Android does nothing, doesn't even show a received push notification
Reproduce Scenario (including but not limited to)
Steps to Reproduce
See below...
Platform and Version (eg. Android 5.0 or iOS 9.2.1)
iOS 9.3.3 on an iPad3, iPhone 4s, iOS 10.1 on an iPhone 5c Android 4.2.2 on a NextTab (latest version for that device)
(Android) What device vendor (e.g. Samsung, HTC, Sony...)
NextTab
Cordova CLI version and cordova platform version
CLI 6.2.0 for both Android and iOS
Plugin version
1.8.4 (latest version that works with XDK)
Sample Push Data Payload
iOS: Payload to GCM:
iOS Push Payload Received:
Android fields to GCM:
Android Push Payload:
Sound File Types and Locations: iOS:
Android:
The custom sound files are 16 bit (not sure if mono or stereo or if that matters).
I'm stumped.