Page tree
Skip to end of metadata
Go to start of metadata

Last updated: May 16, 2019 11:24

Problem

As a user not able to close the Google Assistant Application in Android devices by using Close App Command

Solution

As per analysis, Google Assistant cannot be closed by the ADB command, we pass through command\function ‘close app’

As the process(Google Assistant App) is on AutoRun as we can see from the logcat:


[ 05-15 13:11:07.743   829:  847 D/ActivityManager ]

isAutoRunBlockedApp:: com.google.android.apps.googleassistant, Auto Run ON


For this app, it’s best to execute ‘Home’ button click & that actually closes the application (basically android bring app in background).

On consecutive app open it starts from scratch, so user no need to worry about clearing your Assistant history.

Where as Close App Command will execute on app and show as successful, but as its AutoRun enabled so app will run in background which will not be able close in device.

So open app will open the app, but for Close, use the Home button.

Steps to be followed in android device for handling Google assistant App for your scenarios to be implemented,

  1. Start Application command by using package identifier
  2. instead of Close App command use 'Home' button/command
  3. again call Start Application command to relaunch app.

here addition logcat information is add in below here : 

[ 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 ]