-
Notifications
You must be signed in to change notification settings - Fork 7
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
custom notification sound not working on android #11
Comments
It's probably not possible to play a custom notification sound by simply packaging the sound the way you package other app assets with AIR. You'll have to provide the sound as an Android resource file. Unfortunately, there's no other way than to create ANE with the sound packaged as a resource. You could add the sound to the resources already packaged in this ANE (the notification icons) or you could create a separate ANE. The ID you assign to the sound should be used in the OneSignal dashboard. |
Thanks for your replay, I've already added the sound files to the ANE package within the resources folder in raw folder, the weird thing is when i send the right sound id from OneSignal it just vibrates and if i send any wrong id it plays the default notification sound |
Thanks for the additional info. I'll take a look at it. Just for a reference, what sound formats did you try? |
I have tried mp3, wav and ogg. |
Unfortunately, it looks there's an issue with AIR itself. It seems to deal with sound resources incorrectly:
I'll have to create a bug report and see what AIR dev team have to say about it. |
Please provide us with a link to bug tracker. We'll vote for it. |
custom notification sound not working on android with all sound file formats, it just vibrates when i send the sound name
i contacted the technical support in Onesignal.com and tested my apk and found this error with the ANE,
The text was updated successfully, but these errors were encountered: