Media controls notification emits alert on Android O

前端 未结 1 1303
名媛妹妹
名媛妹妹 2021-01-12 15:07

Ever since adding support for Android O, Android devices running O receive an alert (tone or vibration) whenever my app\'s media controls notification gets updated (metadata

相关标签:
1条回答
  • 2021-01-12 15:55

    Per the Migrating MediaStyle notifications to Android O, you should be using IMPORTANCE_LOW, which does not contain any sound - IMPORTANCE_HIGH channels have sound associated with them.

    Android already reorders MediaStyle notifications higher in the tray, so using a higher importance is not necessary as it was on previous versions of Android.

    NOTE: After changing the importance, you need to clear app data or reinstall the app in order to have this change take effect in notification channel.

    0 讨论(0)
提交回复
热议问题