title: Keep an activity/activities alive while the app is open in the background
body: <p>Hey guys I'm brand new to this site, I know people get put down a lot for asking duplicated questions so I hope this isn't one of them. </p>
  
  <p>As well as this site, I am new to android programming and have <strong>created a simple app for calculating a price based on time.</strong></p>
  
  <p>this app has 3 activities that i use to switch layouts
  1. <code>FirstActivity</code> - shows title page and button to launch second activity
  2. <code>SecondActivity</code> - starts a timer and calculates price based on seconds.
  3. <code>LastActivity</code> - shows the end  results of time and price and allows the user to share this with other apps (email, sms) </p>
  
  <p>Everything is working fine, however when the phone orientates the current activity is killed and restarted I've fixed this by forcing the layout to portrait - I've now run into this problem again when i move the app to the background</p>
  
  <p><strong>SO THE ACTUAL QUESTION: I need my <code>SecondActivity</code> to keep time, and my <code>LastActivity</code> to keep the saved info even if the user switches apps.</strong> I'm not talking about when the app is closed im talking about when the app switcher or home button are activated and my app is still open in the background.</p>
  
  <p>thank you in advance!</p>