HiVo is an app that can continuously record audio in the background, then gives you the ability to save a portion of it when something interesting happens. You can also schedule recordings to happen at some point in the future.
It was developed for SENG402 at the University of Canterbury.
You can download it on Google Play here.
The user manual is available here.
Import the project into Android Studio and run it. For more detailed instructions, see https://developer.android.com/studio/run.