Disable vibration for a notification

前端 未结 7 1152
北荒
北荒 2020-12-09 15:11

I\'m writing an app using notification. Google developer guidelines encourages developers to provide settings to customize the notifications (disable vibration, set notifica

7条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-09 15:58

    They are not stop because you are use "setDefaults(Notification.DEFAULT_ALL)" so if you need to stop vibration and sound remove this line , or if you need to use the default sound and stop vibration I think you must use setDefaults(Notification.DEFAULT_SOUND) etc ...

提交回复
热议问题