I have developed an application which take image from front camera after every 30 seconds. When I press the back button my application stops. I want to run my application in background and I have no idea how to do it. Any help will be appreciated..
You can use an IntentService. It runs on a background thread and is not affected by UI lifecycles. You can reach about how to use it here in the Android Developer Docs