Android GCM turn on Lights

前端 未结 4 795
南方客
南方客 2020-12-15 13:45

I\'m doing a project in Android. I can successfully receive push notifications.

How to turn on the lights when I receive the push notification?

And also I

4条回答
  •  误落风尘
    2020-12-15 13:59

    please Add this code in set Notification method

             notification.flags   |= Notification.FLAG_AUTO_CANCEL;
        notification.defaults |= Notification.DEFAULT_SOUND;
        notification.defaults |= Notification.DEFAULT_LIGHTS;
        notification.defaults |= Notification.DEFAULT_VIBRATE;
    

提交回复
热议问题