如何避免振动模式下的振动?
How to avoid vibrations in vibrate mode?
我正在使用 NotificationCompat.Builder 构建通知,根据应用配置,它可以发出声音或振动或两者兼而有之。一切正常,但是当 phone 切换到振动模式时,通知会振动,即使它们只启用了声音。为什么phone切换到震动模式后builder.setSound
会震动?有办法摆脱它吗?
我找到了类似的 SO question 但它似乎没有解决我的问题。
这里有几个版本,在 Samsung Galaxy Note 3 上测试
compileSdkVersion 23
minSdkVersion 14
targetSdkVersion 23
Why does builder.setSound result in vibration when phone is switched to vibrate mode?
因为这就是振动模式的作用。它用振动模式代替铃声和其他通知声音,因此用户知道有通知,但警报(通常)听不见。
Is there a way to get rid of that?
欢迎您在 the user has vibration mode on 时不要拨打 setSound()
。
我正在使用 NotificationCompat.Builder 构建通知,根据应用配置,它可以发出声音或振动或两者兼而有之。一切正常,但是当 phone 切换到振动模式时,通知会振动,即使它们只启用了声音。为什么phone切换到震动模式后builder.setSound
会震动?有办法摆脱它吗?
我找到了类似的 SO question 但它似乎没有解决我的问题。
这里有几个版本,在 Samsung Galaxy Note 3 上测试
compileSdkVersion 23 minSdkVersion 14 targetSdkVersion 23
Why does builder.setSound result in vibration when phone is switched to vibrate mode?
因为这就是振动模式的作用。它用振动模式代替铃声和其他通知声音,因此用户知道有通知,但警报(通常)听不见。
Is there a way to get rid of that?
欢迎您在 the user has vibration mode on 时不要拨打 setSound()
。