Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,731,426 Members 53,649 Now Online
XDA Developers Android and Mobile Development Forum

[Q] How to find whether the device has a notification LED or not?

Tip us?
 
gemini-h
Old
#1  
Member - OP
Thanks Meter 8
Posts: 80
Join Date: Jan 2013
Default [Q] How to find whether the device has a notification LED or not?

I've been searching for an API for discovering in Java code whether the device has a notification light or not, and I've found nothing. So my simple question is: does such a thing exist? I'm working on an app that has some settings for notification light behavior, and I'd like to hide those setting options entirely on devices that don't have the hardware.
 
mohamedrashad
Old
#2  
mohamedrashad's Avatar
Senior Member
Thanks Meter 415
Posts: 876
Join Date: Nov 2012
Location: ismailia
Indeed no way to do this.
But you can try the follow
When the user opens the app for the first time in on create make this

Try{
//open or use LED
Set visibility of LED options to True
}
catch {
//if not found, Set Option Visibility To False
}


Try Pi Developers apps

Socials Addict || Floata For Twitter
| | Pi locker

Check Pi Developers Blog

pidevelopers.blogspot.com


My Work For Android



The Following User Says Thank You to mohamedrashad For This Useful Post: [ Click to Expand ]
Tags
notification light
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes