Is it possible to push an application to the background through an adb command? I have an application which calls google navigation and I want push google navigation to the background using an adb command. I don't want to just go back to the home screen, I want make sure the app which called google navigation remains on the foreground. So far I have:
adb shell am force-stop com.google.android.apps.maps
But the above command force stops the process instead of pushing to background.
You can send a Home
key event via adb
, pressing Home
should put an Activity to the background:
adb shell input keyevent 3
from the docs:
public static final int KEYCODE_HOME Added in API level 1
Key code constant: Home key. This key is handled by the framework and is never delivered to applications. Constant Value: 3 (0x00000003)
possible values: http://developer.android.com/reference/android/view/KeyEvent.html
more to-the-point list: ADB Shell Input Events
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With