Звук ионного локального оповещения не работает на Android 8.0 - PullRequest
0 голосов
/ 28 февраля 2019

Предоставьте общее описание проблемы.

Среда

  • Версия плагина: 0.9.0-beta.2
  • Платформа: Android
  • Версия ОС: 8.0.x
  • Производитель / модель устройства: Samsung Galaxy s8
  • Версия Cordova (cordova -v): 4.2.1
  • Версия платформы Cordova (cordova platform ls): 7.1.4
  • Конфигурация плагина: нет
  • Ионная версия: 3.9.2

Ожидаемое поведение

Использование:

this.localNotifications.schedule({
                    id: 1,
                    text: 'You have arrived',
                    sound: 'file://assets/sounds/alerts/arrival.mp3',
                    data: { secret: 'hellloo' },
                    vibrate: true
                });

Я хочу отобразить уведомление с пользовательским звуком. Расположен в src/assets/sounds/alerts/...

Фактическое поведение

Я перепробовал все возможные пути к файлам (я думаю), однако это все ещевоспроизводит звук уведомления Samsung Galaxy s8 по умолчанию.

Журналы отладки

Выход Logcat:

02-28 17:38:06.354  3779  3779 D EdgeLightingManager: showForNotification : isInteractive=true, isHeadUp=false, color=0, sbn = StatusBarNotification(pkg=io.ionic.starter user=UserHandle{0} id=1 tag=null key=0|io.ionic.starter|1|null|10203: Notification(channel=default-channel-id pri=0 contentView=null vibrate=null sound=null tick defaults=0x0 flags=0x11 color=0x00000000 number=0 vis=PUBLIC semFlags=0x0 semPriority=0 semMissedCount=0))
02-28 17:38:06.354  3779  3779 D EdgeLightingPolicyManager: putNotification tickerText:true,titleText:true,text:true,sub:falsecn= + null
02-28 17:38:06.354  3779  3779 D EdgeLightingPolicyManager.NotificationGroup: updateNotificationData put :0|io.ionic.starter|1|null|10203,size=7
02-28 17:38:06.354  3779  3779 D EdgeLightingPolicyManager.NotificationGroup: 0|io.ionic.starter|1|null|10203:NotificationData time=1551371886354,
02-28 17:38:06.354  3779  3779 D EdgeLightingPolicyManager.NotificationGroup: 0|android|40|null|1000:NotificationData time=1551371251595,
02-28 17:38:06.355  3779  3779 D EdgeLightingPolicyManager.NotificationGroup: 0|com.rolflex.mobCSRApp|6|null|10156:NotificationData time=1551291051811,
02-28 17:38:06.355  3779  3779 D EdgeLightingPolicyManager.NotificationGroup: 0|com.wssyncmldm|1|null|1000:NotificationData time=1551349895823,
02-28 17:38:06.355  3779  3779 D EdgeLightingPolicyManager.NotificationGroup: 0|com.google.android.apps.maps|g:atn_group:NotificationData time=1551371775363,
02-28 17:38:06.355  3779  3779 D EdgeLightingPolicyManager.NotificationGroup: 0|com.rolflex.mobCSRApp|-574543954|null|10156:NotificationData time=1551291051833,
02-28 17:38:06.355  3779  3779 D EdgeLightingPolicyManager.NotificationGroup: 0|com.android.vending|874755343|null|10043:NotificationData time=1551314492705,
02-28 17:38:06.355  3779  3779 D EdgeLightingPolicyManager.NotificationGroup: 0|com.android.settings|9|null|1000:NotificationData time=1550852356484,
02-28 17:38:06.355  3779  3779 D EdgeLightingManager: showForNotificationScreenOn : return false by isAcceptableApplication.
02-28 17:38:06.365  3779  3779 I AccessibilityManagerService: semOnLightNotification(null), bIsFlashOn : false
02-28 17:38:06.372  4196  4196 D StatusBar: addNotification key=0|io.ionic.starter|1|null|10203 fullscreen:false
02-28 17:38:06.460  3426 15233 V NuPlayer: onSourceNotify() kWhatFlagsChanged  FLAG_CAN_PAUSE: 1  FLAG_CAN_SEEK_BACKWARD: 1 
02-28 17:38:06.461  3426 15233 V NuPlayer: NuPlayer::onSourceNotify Source::kWhatPrepared source: 0xe7d6dc40

Я заметил, что в журнал записывается 'sound = null', чтоэто немного странноЗаранее спасибо.

С уважением,

Иона

...