我使用的通知,現在該服務仍在運行,讓用戶。現在我想使用通知來提醒用戶。 (因爲它的花哨)的Android notificationlight不工作
通知工作正常,但通知燈什麼都不做。其他應用程序很好地工作的通知指示燈(每增加一個Facebook)的
它或多或少的通知,並加入這些標誌的示例代碼:
notification.ledARGB = 0xff00ff00;
notification.ledOnMS = 100;
notification.ledOffMS = 100;
notification.flags |= Notification.FLAG_SHOW_LIGHTS;
notification.flags |= Notification.FLAG_NO_CLEAR + Notification.FLAG_ONGOING_EVENT;
mNotificationManager.notify(NOTIFICATION_ID, notification);
和
notification.defaults |= Notification.DEFAULT_LIGHTS;
,而不是沒有按也不行。
我調試上的Galaxy Nexus與Android 4.0,但應用程序的目標就是Android 2.3.3
編輯: 這會是權限的問題?如果是,哪一個?我瀏覽了所有內容,發現通知燈沒有匹配的權限。
強制性「你確定你有正確的權限的通知燈」 – antlersoft 2012-04-27 22:08:13
好問題,是我能得到它們嗎? – trichner 2012-04-27 22:09:16
在AndroidManifes.xml文件 – 2012-04-27 22:09:55