0

is there a simple way to stop a running application using ADB. Szenario:

Working on App
Have a script which uploads, installs and starts App on change
Problem:

Currently running version gets killed (not shutdown), which make testing cleanup very hard. Option would be to "do cleanup in between", like after a certain time, but I would prefer to do it in the correct location (so like with the OS, as long as the App is still running, so need to save value, as soon as the OS tells me e.g. memory low or calls onDestroy, I want to save stuff)

Chris

Christian Ruppert
  • 3,749
  • 5
  • 47
  • 72
  • DDMS has a button to stop a running process, but I don't know if this is exactly what you are looking for. – Thomas Nov 02 '11 at 18:31
  • This chap has an extensive post that might help http://stackoverflow.com/questions/2092951/how-to-close-android-application – Scott Tomaszewski Nov 02 '11 at 20:42

1 Answers1

0

I'm not aware of a way to do this. I was hoping there might be a way to send an intent to tell the app to exit using adb shell e.g.

adb shell am start -a [intent] -n [class]

However, I found that somebody asked this question on a Google forum but they haven't got an answer:
http://groups.google.com/group/android-platform/browse_thread/thread/3fd02d01c6c3b41a/56814e518503efd6

Dan J
  • 25,433
  • 17
  • 100
  • 173