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秒,
posted @ 2012-12-15 10:58  Dminter  阅读(330)  评论(0编辑  收藏  举报