In the `onCreate()` method of my activity I have a `Timer` + `TimerTask` that will schedule a `ParseQuery`. On The `ParseQuery` callback, which is on `mainThread`, I delegate an interface callback to make a simple UI update. This works when I let the Activity unchanged. But if I exit from the activity and enter again it (A new timer will NOT be created here, because it gets created only when starting the activity from a certain point) wouldn't work. I think is something with Activity instances but I cannot handle it.

```
    @Override
    protected void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       setContentView(R.layout.activity_chat);

       ....
       uiTimer = new Timer();
       uiTask = new TimerTask() {
         @Override
         public void run() {

            doParseTask();
         }
        };
        uiTimer.schedule(uiTask, shortCodeLeft);
    }

    doParseTask(){
      Utils.doParseQuery(this, new MyListener{
      @Override
      public void onSuccess() {
           updateUI();
          }
       });
    }

 updateUI(){

      Log.i(TAG, "Show changed layout"); //This is always shown, this way I ensure it gets here!!
      mTextView.setText(foo); //this doesn't work
      mLayout.setVisibility(View.GONE); //this doesn't work
  }

```

The `ParseQuery` is executed in `done()` callback method, I call the function that updates the UI:

```
public class Utils{
 .......

   doParseQuery(Context ctx, MyListener listener){
    .......

     query.saveInBackground(new SaveCallback() {
        @Override
        public void done(ParseException e) {
            if(e == null){
                ....
                listener.onSuccess();
            }
        }
    });
  }
}

```

What I have tried, with no success:

```
 1. make the `uiTimer` and `uiTask` static global variables; // I thought that maybe it gets leaked into activity instances
    2. update the UI using 
       runOnUiThread(new Runnable() {
                            @Override
                            public void run() {}
                        });

    OR

       mLayout.post(new Runnable() {
                            @Override
                            public void run() {
                                mLayout.setVisibility(View.GONE);
                            }
                        });
3. android:launchMode= "singleInstance" //in Manifest

```