Back

Process KillerAn open source app for quickly and easily testing Android state restoration.

Why we built it.

Android state restoration has always been a core behavior and critical feature of Android apps, but the tools for testing it have typically been difficult to access or simply inadequate. The two most common ways to do so are to simply rotate a device or to use the well-known "Don't Keep Activities" developer option. Neither of these, however, actually kills the app's process, which leaves an entire class of state restoration bugs untested.

Process Killer is an easy-to-use app that fills in this gap. Because it can be downloaded from Google Play and does not require developer options to be enabled, it can be used by anyone looking to test an app, not just developers.

How does it work?

At its core, Process Killer relies on a single call to the operating system to "kill" a running process : ActivityManager.killBackgroundProcesses(packageName). This disposes of the process in the same way the OS would when background resources need to be reclaimed and it then places the associated app in a state in which it will be "restored" when the user returns to it. This call can be made by any app by adding a single permission : android.permission.KILL_BACKGROUND_PROCESSES.

The real heavy-lifting done by the Process Killer app, though, is to actually manage which apps are displayed. By making use of UsageStatsManager and managing the appropriate permissions, Process Killer surfaces only the most relevant apps ordered by how recently they were used to maximize testing efficiency.

After clicking on an app to "kill" it, Process Killer then uses all the relevant package information it already has on hand to provide a button that will take you back to the killed app where you can immediately check its behavior under state restoration. This once cumbersome testing process is now reduced to just two clicks!

More details can be found in the GitHub repo.

How do I use it?

Anyone can download the app from the Google Play Store. Then, to test state restoration by "killing" an app's process, simply open Process Killer, find the desired app from the list of recently running apps, and click on it. It's that simple.

We are Livefront.

Our team creates beautiful mobile apps for people in motion. We work every day with Fortune 500 companies and startups alike to build custom software for phones, tablets, mobile payment wallets, and wearables like watches and glasses. We care deeply about quality, and we love what we do.