I am adding the Dreamservice to my app, where I would like to play a video during the dream. Roughly the same code I use to hide the navigation control during my Main Activity
// Hide navigation controls
View v = findViewById(R.id.dream);
v.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);
causes the Daydream to crash. Looking at some other Daydreams, it seems like none of them hide the bar either. Is it possible to do this? Otherwise, the video I am playing during the Daydream isn't able to center properly.
Try a little different approach.
Any of
getWindow()
orgetDecorView()
might returnnull
, especially when not dreaming.Keep the docs in mind. You might need to reapply this flag regularly. If the
DreamService
is interactive, it will not dismiss on the first input event either, just on the second.