【发布时间】:2013-03-05 09:17:04
【问题描述】:
以下代码在装有 Android 2.3.3 的 Motorola Defy 上运行良好 但是它不适用于 Nexus 4。LED 本身应该没问题,市场上的应用程序颜色 LED 测试仪可以工作。
NotificationManager notif = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
final Notification notification = new Notification();
notification.ledARGB = Color.RED;
notification.ledOnMS = 1000;
notification.ledOffMS = 300;
notification.flags |= Notification.FLAG_SHOW_LIGHTS;
notif.notify(1, notification);
有人知道这里有什么诀窍吗?
【问题讨论】:
标签: android android-notifications led