title: How to count time in two different activities?
body: <p>I don't know if this is even possible but I have several activities, two at the moment, and I have time limit of 20 minutes for player to finish the game. The problem is, he starts at one activity, then goes to another and so on. How to keep the timer going even in another activity, and keep it visible in a textView?</p>
  
  <p>EDIT for minhaz:</p>
  
  <pre><code>public void getTime(long value, String PREFERENCE_NAME){
          SharedPreferences myPrefs = mContext.getSharedPreferences(PREFERENCE_NAME, Context.MODE_PRIVATE);
          SharedPreferences.Editor prefsEditor = myPrefs.edit();
          prefsEditor.putLong("time", value);
          prefsEditor.commit();
      }
  </code></pre>