pbreault / adb-idea

A plugin for Android Studio and Intellij IDEA that speeds up your day to day android development.
Apache License 2.0
2.1k stars 256 forks source link

Restart Process Action #129

Open PaulWoitaschek opened 3 years ago

PaulWoitaschek commented 3 years ago

It would be great to have an action to actually restart the process. Currently you can't test ui changes on a real process restart because a new task is created.

I just wrote this script that simulates a process restart:

#!/bin/bash
PACKAGE="my.package.name"
adb shell input keyevent KEYCODE_APP_SWITCH
adb shell am kill $PACKAGE
adb shell input keyevent KEYCODE_BACK

This is a real process restart and not just a configuration change. I wrote this script because we had a bug in our parceling where a bundle need to have the ClassLoader set.