notification通知配合使用LED灯,附带震动

notification通知配合使用LED灯,附带震动
notification.ledARGB = Color.BLUE;
notification.ledOffMS = 100;
notification.ledOnMS = 100;
notification.flags |= Notification.FLAG_SHOW_LIGHTS;
notification.flags |= Notification.FLAG_AUTO_CANCEL;// 点击取消
Vibrator vibrator = (Vibrator) context
.getSystemService(Service.VIBRATOR_SERVICE);
vibrator.vibrate(new long[] { 200, 500, 200, 500 }, -1);// {200,200,1000}这样的mode表示的是等待0.2秒,振动0.5秒, 等待0.2秒,振动0.5秒,
原文地址:https://www.cnblogs.com/Dminter/p/2819034.html