From ca83c559a8581af5f24588566256bf4865251760 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9=20=D0=9A=D0=BE?= =?UTF-8?q?=D0=BC=D0=BF=D0=B0=D0=BD=D0=B5=D1=86?= Date: Thu, 11 Jul 2019 11:41:08 +0300 Subject: [PATCH] feat(android): Added playback with the schema "SCHEME_CONTENT" on Android --- src/android/com/adobe/phonegap/push/FCMService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/android/com/adobe/phonegap/push/FCMService.java b/src/android/com/adobe/phonegap/push/FCMService.java index db1738a72..c5ae892cb 100644 --- a/src/android/com/adobe/phonegap/push/FCMService.java +++ b/src/android/com/adobe/phonegap/push/FCMService.java @@ -735,11 +735,15 @@ private void setNotificationSound(Context context, Bundle extras, NotificationCo } if (SOUND_RINGTONE.equals(soundname)) { mBuilder.setSound(android.provider.Settings.System.DEFAULT_RINGTONE_URI); - } else if (soundname != null && !soundname.contentEquals(SOUND_DEFAULT)) { + } else if (soundname != null && !soundname.contentEquals(SOUND_DEFAULT) && !soundname.contains(ContentResolver.SCHEME_CONTENT + ":")) { Uri sound = Uri .parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + context.getPackageName() + "/raw/" + soundname); Log.d(LOG_TAG, sound.toString()); mBuilder.setSound(sound); + } else if (soundname.contains(ContentResolver.SCHEME_CONTENT + ":")){ + Uri sound = Uri.parse(soundname); + Log.d(LOG_TAG, sound.toString()); + mBuilder.setSound(sound); } else { mBuilder.setSound(android.provider.Settings.System.DEFAULT_NOTIFICATION_URI); }