Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to kill android app by Android Studio

I want simulate the situation when my app killed by OS.

Example: I’ve hidden my app (by pressing middle circle nav button) and opened any other app, now I need to kill process and observe what would be if I open app from recent opened app list(by pressing right rect nav button).

How I can simulate killing app by OS?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

enter image description here

>Solution :

You can simply kill your app by using adb.

adb shell am force-stop <YOUR_PACKAGE>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading