安卓通知闪光灯不起作用



我正在尝试使用Android通知。

当屏幕关闭时,通知振动和声音工作,但闪光灯不工作,当屏幕打开时也不工作

这是我的代码:

  notification.defaults |= Notification.DEFAULT_VIBRATE;
  notification.defaults |= Notification.DEFAULT_SOUND;
  notification.flags |= Notification.FLAG_SHOW_LIGHTS;
  notification.ledARGB = 0xff00ff00;
  notification.ledOnMS = 300;
  notification.ledOffMS = 1000;

我在这里做错了什么?

很可能您的设备根本不支持此操作。

最新更新