Custom sound in Android Push Notifications (GCM ) / Eigener Sound bei Android Push Notifications

31 views
Skip to first unread message

bwei...@media2be.de

unread,
Mar 30, 2015, 6:32:28 AM3/30/15
to phon...@googlegroups.com
[english]
How can I play a custom sound when receiving an Android Push Notification?
Within the app I can control this by using the media player. Outside the APP I can not find the correct path to the audio file . I already have "/android_assets/www/" tried "www/", but there is always the default sound when you receive a push notification outside the app.

[deutsch]
Wie kann ich beim Empfang einer Android Push Notification einen eigenen Sound abspielen lassen? 
Innerhalb der APP kann ich dies über den Media Player steuern. Außerhalb der APP kann ich den richtigen Pfad zur Audiodatei nicht finden. Ich habe es bereits mit "www/", "/android_assets/www/" versucht, aber es kommt immer der Standard-Sound beim Empfang einer Push Notification außerhalb der APP.


Jesse Monroy

unread,
Mar 31, 2015, 3:16:08 AM3/31/15
to phon...@googlegroups.com
To play a custom sound you must give it the FQFN (Fully Qualified File Name).
So yes, you must start with "/android_assets/www/", and it your file is in the
directory "sounds/", then it would be "/android_assets/www/sounds/".

Also, android only plays .ogg files (http://en.wikipedia.org/wiki/Ogg).
There are many converters in Linux, and a few in Windows. I do not know
about Apple.

Let me know, if this helps.
Jesse
Reply all
Reply to author
Forward
0 new messages