0
此代碼完美適用於我的Nexus 4.但在我的Galaxy S3上沒有任何反應。在S3上定製LED
任何想法爲什麼?
public void test(){
if(notificationManager == null) {
Toast.makeText(this, "Mist", Toast.LENGTH_SHORT).show();
} else {
Notification notification = new Notification.Builder(this)
.setLights(Color.argb(1, red, green, blue), 500, 0)
.setContentText("test").setSmallIcon(R.drawable.test)
.setContentTitle("")
.build();
notificationManager.notify(0, notification);
}
}
您是否在'LED設置'中勾選了'Missed Event',並在屏幕關閉時生成通知? –