Ultimately, you can never prevent the system from killing your application once onPause()
has been called. You must always write your application so that it can be restarted. In practice, this means a) implementing onRetainNonConfigurationInstance()
to catch very short-term destruction and re-creation of your app, b) overriding onSaveInstanceState(Bundle)
to catch medium-term destruction/re-creation, and c) overriding onPause()
to handle long-term destruction/re-creation.
In most cases, onSaveInstanceState()
is the only one you really need to implement, but onRetainNonConfigurationInstance()
can be a real optimization.
In your particular case, your onSaveInstanceState()
would write the URI of your video file and the last-played timestamp into the Bundle, so you can return to the last place played in the video when your app is re-created.
As for wakelocks, these are acceptable for e.g. keeping your device from going to sleep in the middle of watching a video. They are not acceptable for keeping your application from being killed just so you don't have to go through the trouble of going through onCreate() a second time. First, it kills the battery, and second, it's no guarantee anyway.
One final note: if you're not doing so, you should make sure your video playing activity has the "singleTop" attribute set, so you don't get multiple instances in the activity stack.