How to start Google Assistant programmatically?

前端 未结 2 746
悲&欢浪女
悲&欢浪女 2020-12-11 18:16

I have tried every simple combo I have found but not sure how to do this. I even tried to simulate the home long press but you get google now voice, lookint at logcat it sho

2条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-11 18:59

    This works:

    startActivity(new Intent(Intent.ACTION_VOICE_COMMAND).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
    

提交回复
热议问题