I am launching a media intent to take a photo. After the user took a picture and gets back to the previous activity the whole application has restarted. 

As this doesn't happen all the time, I think my application goes to the background and android kills it when the device has low memory.

Is there any way to keep my application from going to the background?

Thanks!