I'm trying to implement a daydream service with a transparent background.

I wrote the following code:

public void onAttachedToWindow() {
    super.onAttachedToWindow();
    setContentView(R.layout.mydream);
    getWindow().setBackgroundDrawable(new ColorDrawable(0));
    .
    .
    .
}


But when I start up the daydream, the background is only transparent for 1 second. After that it turns to black background.

Can anyone help me with this?


Question: Ubuntu 14.04 Dell Inspiron 15R Unable to adjust Brightness
Answer: I wrote a small script which I use to control the brightness.  Basically you want to poke a value into /sys/class/backlight/intel_backlight/brightness.  The max value can be found in /sys/class/backlight/intel_backlight/max_brightness

My simple script is:

#!/bin/bash
echo $1 | sudo tee /sys/class/backlight/intel_backlight/brightness




An alternate answer is suggested by itsfoss, however I had to modify it slightly as the pci bus ID seems to have changed since Ubuntu 13.10:

Create the file 20-intel.conf

sudo touch /usr/share/X11/xorg.conf.d/20-intel.conf

Edit the file so that the contents are

Section "Device"
        Identifier  "card0"
        Driver      "intel"
        Option      "Backlight"  "intel_backlight"
        BusID       "PCI:0:02:0"
EndSection