Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to test code that lights an Android device's LEDs?

Tags:

android

How might I test code that lights up LEDs on an Android device? I do not have a device with LEDs.

notif.ledARGB = color.BLUE; 
notif.ledOnMS = 100;
notif.ledOffMS = 100;
notif.flags |= Notification.FLAG_SHOW_LIGHTS;
like image 571
Crystal-R Avatar asked Oct 09 '11 22:10

Crystal-R


People also ask

How do I check my notification light?

Open Settings, and select Notifications. Under Notifications, select 'Brief pop-up settings' Under this, select 'Edge lighting style' Select the type of LED light that you want to see on your screen, and tap 'Done'


2 Answers

As far I can tell there is no way to directly test LEDs in the emulator. The best you can do is ensure your notification is working properly and then assume that the LED is working as well. Maybe you could borrow a friend's device with an LED? If anyone else knows how to do this in the emulator, I'd love to know how!

like image 107
shanet Avatar answered Oct 17 '22 19:10

shanet


The android emulator is open source. If it doesn't currently support LEDs, you can look into adding support and submitting a patch.

like image 43
JesusFreke Avatar answered Oct 17 '22 17:10

JesusFreke