2
0
mirror of synced 2025-01-24 21:30:16 +00:00

Merge pull request #985 from giladno/patch-1

allow using ringtones from RingtoneManager
This commit is contained in:
Chris Bianca 2018-04-16 21:47:49 +01:00 committed by GitHub
commit 546e3f5d8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -560,7 +560,9 @@ public class RNFirebaseNotificationManager {
}
private Uri getSound(String sound) {
if (sound.equalsIgnoreCase("default")) {
if (sound.contains("://")) {
return Uri.parse(sound);
} else if (sound.equalsIgnoreCase("default")) {
return RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
} else {
int soundResourceId = getResourceId("raw", sound);