简体   繁体   中英

Possible to launch the Google Assistant from my own Xamerin Android application?

Is it possible to launch the Google Assistant from my own Xamerin Android application instaed of long press the home button? I have done some research and there are plenty of examples where the Google Assistant can call your own application but not the way around. Is Google allowing users to launch the Assistant in other ways than speech and the home button?

Just start its activity com.google.android.apps.googleassistant/.AssistantActivity I believe something like below should do the trick

Intent i = new Intent();
i.setPackage("com.google.android.apps.googleassistant");
i.setClassName("com.google.android.apps.googleassistant.AssistantActivity");
startActivity(i);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM