New experimental Illumination bar API available

Many people have contacted us about the API for the illumination bar available on a number of our Xperia™ smartphones, such as Xperia™ SP. And upon these requests from the developer community, we are as of today providing the Illumination API for free as an “experimental API”. This means you can experiment with illumination effects in your app in any way you like, but we will only provide limited documentation and no support. Read on to learn how to get started!

With the introduction of the Illumination bar API, we also introduce Experimental APIs as a new type of APIs. Under this label, we will make “playful” APIs available, if there is a big public demand, and if we could provide it. It could also be APIs for niche products that a small number of developers may find useful, but for which we are not able to provide extensive documentation or full support. You are free to use experimental APIs as you like, but we can’t guarantee the functionality, and we will only provide limited support.

The Illumination bar API allows developers to control the LED light illumination bar at the bottom of a number of Xperia™ smartphones (see the list of support phones below). Some of the options that can be set are the LED colour, whether or not the LED pulses and time between pulses, and various pre-defined fading patterns.  On Xperia™ SP, the LED can also be set to illuminate in rhythm with music from the audio player.

Supported phones

The following phones are fully supported by the Illumination bar API:

  • Xperia™ SP
  • Xperia™ ZL
  • Xperia™ ZR
  • Xperia™ UL
  • Xperia™ A

The following phones are also supported by the Illumination bar API, but the support for the pre-defined fading patterns is less extensive on these devices:

  • Xperia™ U
  • Xperia™ L
  • Xperia™ S
  • Xperia™ SL
  • Xperia™ P
  • Xperia™ sola
  • Xperia™ ion
  • Xperia™ acro HD
  • Xperia™ go
  • Xperia™ M
  • Xperia™ M dual

Also, for some devices (for example Xperia™ S and Xperia™ P) the hardware only supports white colour.

How to use the Illumination bar API
To add illumination effects to your app, you need to take the following steps:

1. Download  the file to the \src\com\sonyericsson\illumination directory in your Android project. Create the needed directories if they don’t exist already.

2. Set the illumination permission in the AndroidManifest:

<uses-permission android:name="com.sonyericsson.illumination.permission.ILLUMINATION"/>

3. Use the illumination intent in your Activity to create the effect you want (change com.yourapplication.packagename to the actual package name of your app):
Intent intent = new Intent(IlluminationIntent.ACTION_START_LED);
intent.putExtra(IlluminationIntent.EXTRA_LED_ID, IlluminationIntent.VALUE_BUTTON_2);
intent.putExtra(IlluminationIntent.EXTRA_PACKAGE_NAME, "com.yourapplication.packagename");

If you want your app to check if a device supports the Illumination API, you can add the following code to your Activity:
Intent checkIntent = new Intent(IlluminationIntent.ACTION_STOP_LED);

        // Evaluate if we have the Illumination Service installed that can receive the intent
        if (null == getPackageManager().resolveService(checkIntent,
                PackageManager.GET_RESOLVED_FILTER)) {
               //  Not supported

As you can see, it is really easy to add illumination effects to your app. So have a look at the Illumination bar API page, where you will find all the information we provide about this API, including specifications of the pre-defined fading patterns. If you create an app using this API, we would be happy to hear from you. Just drop us a comment below.

Develop apps for Sony devices with the Sony Add-on SDK
The Sony Add-on SDK is the official SDK for Sony’s mobile Android devices, and it includes a number of different APIs, emulator, code examples and extensive documentation. You can for example develop apps for SmartWatch, create your own Small Apps and much more. Learn more in the Sony Add-on SDK section.

What other APIs would you like us to release? Drop us a comment and let us know.

More information

Comments 18

Sort by: Newest | Oldest | Most popular

  1. By kauser salam


    I have Xperia SP, but as mobile go on sleep, its illumiation on music stop working, is there any way out to make it enlightened till music Stops

  2. By Poorna Chan


    Could you help me find the directory to save this file?

  3. By Matilde Mar


    Will it work on costom ROM? Any noob-friendly tutorial on how to do it?

  4. By Farhan Nabil


    man~ Maybe I need video of tutorial .. 🙁

    • By Marlin L


      Did you follow the steps listed in the “How to use the Illumination bar API” above?

  5. By Marlin L


    In general for questions regarding which phones are supported:

    If the phone has an LED light bar at the bottom, the API should at least be partially supported. Other phones which do not have a light bar will support the API but only for controlling the notification LED. Patterns will not be supported for the notification LED, only color changing and on/off.

  6. By Honza Brťák


    Can you make it also for Xperia Miro? There is also illumination bar

  7. By Дмитрий Тепляков


    Hi! You can modify JB audio blobs Xperia P (LT22i) for CyanogenMod 10, as you did it for CyanogenMod 9.1?
    And need help with ALS!
    It create very high load cpu (CyanogenMod 9.1, 10)!

  8. By Alma Mater


    Way to go, Sony! After years of avoiding your products as best as I could (although I fell for the original xperia with winmo 6.1), you seem to get things right. Even though it is not on the list, this will probably make me buy the Xperia Z or T.

  9. By A D


    this mean that xperia s white illumination color from white can change toanother color or color changin is just for the full supported phone and can’t create a folder with src name in phone
    and another question that my xperia s not recived 6.2.b.0.211 update please answer

    • By Marlin Liew


      Yes, color changing is supported on Xperia S. Not sure what you mean by ” can’t create a folder with src name in phone”, what are you trying to accomplish here?

  10. By Kharisma Ankh


    I hope we can finally make LED bar to work with xperia U JB ported rom.

  11. By Michele Renzullo


    Enjoy, soon we will have a fully functional LED bar on custom ROM. We hope