How do you start the user's selected Daydream programmatically?

后端 未结 1 896
情歌与酒
情歌与酒 2020-12-31 16:59

On my Galaxy Nexus, I can tap this button in system preferences to start my currently selected daydream.

\"prefe

1条回答
  •  不思量自难忘°
    2020-12-31 17:25

    • Edit 9/22/2014: This does not work on some Samsung phones I figured out how to do this by digging through some Android source code.
    final Intent intent = new Intent(Intent.ACTION_MAIN);
    intent.setClassName("com.android.systemui", "com.android.systemui.Somnambulator");
    startActivity(intent);
    

    Sample app available here.

    0 讨论(0)
提交回复
热议问题