title: Reset countdown timer in Android when switching between activities
body: <p>Here I have 3 activities: A, B, and C. From Activity A When I click a button it will goes to Activity B. When Activity B loads the countdown timer will start. Again, when I click a button in Activity B it will go to Activity C. Here I Need a Help.</p>
  
  <ol>
  <li>When Activity C starts I need the countdown timer from Activity B to resume.</li>
  <li>Again I switch over from Activity C to Activity B the countdown timer should be resumed from Activity C.</li>
  </ol>
  
  <h2>Activity A</h2>
  
  <pre><code>public class MainActivity extends Activity {
      Button button;
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
           addListenerOnButton();
  
  
      }
  
  
  
      public void addListenerOnButton() {
  
          final Context context = this;
  
          button = (Button) findViewById(R.id.actone);
  
          button.setOnClickListener(new OnClickListener() {
  
              @Override
              public void onClick(View arg0) {
  
                  Intent intent = new Intent(context, Act_Two.class);
                              startActivity(intent);   
              }
          });
       }
  }
  </code></pre>
  
  <h2>Activity B</h2>
  
  <pre><code>  public class Act_Two extends Activity{
      Button button;
      public TextView textView1;
      public void onCreate(Bundle savedInstanceState) 
      {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.act_two);
          textView1=(TextView) findViewById(R.id.textView1);
  
  
          MyCount counter = new MyCount(61000,1000);
          counter.start();
          addListenerOnButton();
  
  }
      public void addListenerOnButton() {
  
          final Context context = this;
  
          button = (Button) findViewById(R.id.acttwo);
  
          button.setOnClickListener(new OnClickListener() {
  
              @Override
              public void onClick(View arg0) {
  
                  Intent intent = new Intent(context, Act_Three.class);
                              startActivity(intent);   
  
  
              }
  
          });
  }
  
     public class MyCount extends CountDownTimer{
      public MyCount(long millisInFuture, long countDownInterval) {
          super(millisInFuture, countDownInterval);
          }
  
      //iFallApp app1 = new iFallApp();
  
      @Override
      public void onFinish() {
          // TODO Auto-generated method stub
          setContentView(R.layout.activity_main);
          //textView1.setText("done");
      }
  
      @Override
      public void onTick(long millisUntilFinished) {
          // TODO Auto-generated method stub
  
  
          textView1.setText(Long.toString(millisUntilFinished/1000));
  
      }
  }
  }
  </code></pre>