Here I can Play a sound wich I choose: https://fuseopen.com/docs/fuse/playsound.html
But can I play the standard notification sound wich each user has on its device?
Push notifications already has a property for that, just pass in
"sound":"default" into your notification payload.
Thanks Yes and that works like a charm for notification.
The Problem is, that if the app is in foreground there is no notification. So I startet to display a custom notification on screen. This works like a charm.
But therefore I want to play also a sound. The only Way I think is to play a Sound with “PlaySound”. But I dont want a special sound implemented, but the standard Sound of the user.
You know what I mean?
Ok yeah, I know what ya mean, I dunno how to play the devices default sound, I personally would find that quite annoying though, especially if there are a lot of notifications.
You could write your own native module to get the users default notification sound…
Android: RingtoneManager - http://developer.android.com/reference/android/media/RingtoneManager.html
Uri uri= RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
…then just check environment and play it.
Sounds great thanks a lot
You are right, too many are annoying, but it is only for a few and the user can easily turn this off