Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I detect the presence/absence of 'LED notification' on an Android device?

Tags:

android

led

Background: I have an app with notifications and I want to support LED notifications (and it's working perfectly). In my preferences, I allow the user to customize the LED notifications.

Problem: I don't want to show the LED customization options if the device doesn't support them because it can possibly confuse the user (If all you've had were cheap Androids, you have no idea what LED notification is). Is there an API that I can use to detect if the device supports it?

if there is an 'old' and a 'new' way, I'd probably prefer the old way as my lowest supported API level is 4.

Thanks

LED notification: If enabled, your phone's LED will blink for notifications when your display is off.

like image 347
copolii Avatar asked May 13 '11 20:05

copolii


People also ask

What is LED indicator in mobile phone?

A Notification LED is a small RGB or monochrome LED light usually present on the front-facing screen bezel (display side) of smartphones and feature phones whose purpose is to blink or pulse to notify the phone user of missed calls, incoming SMS messages, notifications from other apps, low battery warning, etc., and ...

How do you add a notification light?

On Android phones Open Settings, and scroll down to Accessibility. Under Accessibility, select 'Advanced settings' Under 'Advanced settings, scroll to select 'Flash notification' Switch on the 'Camera flash notification' toggle to enable the rear LED flash for notifications.


1 Answers

Is there an API that I can use to detect if the device supports it?

Alas, no, there is no API for this.

like image 183
CommonsWare Avatar answered Oct 04 '22 21:10

CommonsWare