Chinese, Simplified
请参考下面代码:
/* 让绿灯定时闪烁,周期为10秒 */
public void setFlashMode1(){
Log.i(TAG, "setFlashMode1..");
NotificationManager nm = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
Notification notif = new Notification();
notif.flags = Notification.FLAG_SHOW_LIGHTS;
notif.ledARGB = 0xff00ff00;
notif.ledOnMS = 50;
notif.ledOffMS = 9950;
nm.notify(LED_NOTIFICATION_ID,notif);
Log.i(TAG," lightTest,on,off:"+notif.ledOnMS+","+notif.ledOffMS);
}