Ok, sounds like we should do the following:

1. Introduce a *certified* API for controlling the LED. Draft below.
2. Let the system app use that API in order to set the LED color/blink
pattern any time there's pending notifications.
3. Use the API to indicate battery status (low battery, very low
battery, charging)
4. Add UI in the settings app for controlling notifications from apps.
Including disabling notifications completely for an app, controlling
if it shows up on the lock screen, LED color/pattern etc.

The forth step should of course be done together with UX. And we don't
need to do the fourth step right away but is something that can be
added as time permits.

/ Jonas



On Mon, Sep 8, 2014 at 1:02 PM, Fabrice Desré <[email protected]> wrote:
> On 09/08/2014 12:19 PM, Alexandre Lissy wrote:
>> Le 08/09/2014 10:05, Jonas Sicking a écrit :
>>> I think we should do a few things here:
>>>
>>> 1. Introduce a privileged API for controlling the LED.
>>> 2. Let the system app use that API in order to blink the LED whenever
>>> a notification is rendered.
>>> 3. Use the API to indicate battery status (low battery, very low
>>> battery, charging)
>>> 4. Possibly enable apps to specify an LED pattern when creating 
>>> notifications.
>>>
>>
>> Yep, however, the Flame currently does not have a LED that we could use
>> that easily. There is the charger led, but it's not really intended for
>> this, mostly because as far as I could test hacking in sysfs, any change
>> would work but get overwritten after a couple of seconds.
>
> There's a proper HAL api to control the lights. It's probably overriding
> your hacks as soon as possible ;)
>
> See
> http://androidxref.com/4.4.4_r1/xref/hardware/libhardware/include/hardware/lights.h
>
>         Fabrice
> --
> Fabrice Desré
> b2g team
> Mozilla Corporation
> _______________________________________________
> dev-b2g mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-b2g
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to