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;
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'
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!
The android emulator is open source. If it doesn't currently support LEDs, you can look into adding support and submitting a patch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With