I've implemented red LED light for my notifications for test purposes, but...
Do I have to check if the device has LED (in case that device doesn't have this feature) and if so how to do it? Also, are LED colors predetermined?
I tried to find some docs or thread that would give me an answer for these questions but had no luck...
There is no way of doing this.
According to Can I detect the presence/absence of 'LED notification' on an Android device?
Most hardware features are exposed via the package manager:
PackageManager pm = getActivity ().getPackageManager ();
boolean hasBluetooth = pm.hasSystemFeature(PackageManager.FEATURE_BLUETOOTH);
But not this one.
There is a feature request on record as well: https://code.google.com/p/android/issues/detail?id=38481
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