Close App command with Google Assistant

As a user, you are not able to close the Google Assistant application on Android devices by using the Close App command.

Solution

As per analysis, Google Assistant cannot be closed by the ADB command. Perfecto passes through the command\function close app. From the logcat, we can see that the process (Google Assistant App) is on AutoRun:

[ 05-15 13:11:07.743   829:  847 D/ActivityManager ]
isAutoRunBlockedApp:: com.google.android.apps.googleassistant, Auto Run ON

For this app, it is best to execute a Home button click. This actually closes the application (Android moves the app into the background).

On consecutive app open, the starts from scratch, so users do not need to worry about clearing the Assistant history.

The Close App command, however, executes on the app and shows as successful, but because AutoRun is enabled, the app will run in the background, so the command is not able to close the app on the device.

In short, use the open app command to open the app and the Home button to close it.

To handle the Google Assistant app on Android devices, perform the following steps:

  1. Use the package identifier to run the Start Application command.
  2. Use the Home button/command instead of the Close App command to close the app.
  3. To relaunch the app, call the Start Application command again.

Following is sample logcat information: 

[ 05-15 13:11:07.733 829: 847 I/ActivityManager ] Force stopping com.google.android.apps.googleassistant appid=13031 user=0: from pid 2021
[ 05-15 13:11:07.743 829: 847 I/ActivityManager ] Killing 1752:com.google.android.apps.googleassistant/u0a3031 (adj 15): stop com.google.android.apps.googleassistant cause from pid 2021
[ 05-15 13:11:07.743 829: 847 D/ActivityManager ] cleanUpApplicationRecord -- 1752
[ 05-15 13:11:07.743 829: 847 D/ActivityManager ] isAutoRunBlockedApp:: com.google.android.apps.googleassistant, Auto Run ON
[ 05-15 13:11:07.763 2021: 2021 D/AndroidRuntime ] Shutting down VM
[ 05-15 13:11:07.793 829: 829 V/AlarmManager ] Remove alarm for next reason : android.intent.action.PACKAGE_RESTARTED : package: com.google.android.apps.googleassistant .... [ 05-15 13:11:10.773 2292: 2292 I/ClearDataReceiver ] Intent Name: android.intent.action.PACKAGE_RESTARTED
[ 05-15 13:11:10.773 2292: 2292 I/ClearDataReceiver ] Intent Data: package:com.google.android.apps.googleassistant
[ 05-15 13:11:10.773 2292: 2292 I/SystemBroadcastReceiver ]