Android中推荐的通知振动持续时间是多少? 这是我当前的代码,它会使通知振动1000毫秒
notificationBuilder.setVibrate(new long[] {0,1000});
是否有类似notificationBuilder.setVibrate("default_time");
答案 0 :(得分:0)
默认值可以如下使用 -
num_proj
或者您也可以
NotificationCompat.Builder mBuilder =
new NotificationCompat.Builder(this);
Notification note = mBuilder.build();
note.defaults |= Notification.DEFAULT_VIBRATE;
note.defaults |= Notification.DEFAULT_SOUND;