Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP gemini-h

4th May 2014, 04:56 PM   |  #1  
OP Member
Thanks Meter: 8
 
80 posts
Join Date:Joined: Jan 2013
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.
7th May 2014, 10:10 AM   |  #2  
mohamedrashad's Avatar
Senior Member
Flag ismailia
Thanks Meter: 462
 
1,001 posts
Join Date:Joined: Nov 2012
More
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
}
The Following User Says Thank You to mohamedrashad For This Useful Post: [ View ]
Post Reply Subscribe to Thread

Tags
notification light
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes