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?
This question may have the answer you need: How do I create a transparent Activity on Android?
You can do that by creating a Transparent theme and applying it to your activity.