Hi,
We are developing our game and we need to have custom sounds for Push Notifications on Android.
We implemented the Firebase push notifications using Distriqt ANE
We managed to make custom sounds on Android 8+ using channels.
But for older Android we having the issue that the Firebase is stripping the extension from sound
inside notification. And we receiving something like that
{"notification":{"body":"Town 2 is being attacked.","title":"You're being attacked!","sound":"incoming_attack"},"data":{"sound":"incoming_attack.mp3"}
And ANE is not playing or playing the default sound.
We tried to package the sounds inside the res/raw folder using the ANE-CustomResources
But it doesn't helped.
We having errors something like that
W/MediaPlayer: Couldn't open file on client side; trying server side: java.io.FileNotFoundException: Resource does not exist: android.resource://air.com.our.game/raw/incoming_attack
06-05 16:38:18.347 198-14401/? E/FileSource: Failed to open file 'android.resource://air.com.our.game/raw/incoming_attack'. (No such file or directory)
06-05 16:38:18.347 198-14401/? E/GenericSource: Failed to create data source!
06-05 16:38:18.347 198-14395/? D/NuPlayerDriver: notifyListener_l(0xb6058760), (100, 1, -2147483648)
06-05 16:38:18.347 955-1680/? E/MediaPlayer: error (1, -2147483648)
06-05 16:38:18.348 955-14394/? W/RingtonePlayer: error loading sound for android.resource://air.com.our.game/raw/incoming_attack
java.io.IOException: Prepare failed.: status=0x1
at android.media.MediaPlayer._prepare(Native Method)
at android.media.MediaPlayer.prepare(MediaPlayer.java:1158)
at com.android.systemui.media.NotificationPlayer$CreationAndCompletionThread.run(NotificationPlayer.java:87)