Update GUI when a boolean in a class changes
<p>I'm trying to have my Activity update an ImageView whenever a boolean value changes in another class. </p>

<p>Therefore i have some sort of timer that starts on my first <b>onCreate()</b></p>

<pre><code>private void startTimer() {
    mHandler.removeCallbacks(mUpdateTimeTask);
    mHandler.postDelayed(mUpdateTimeTask, 2000); // first run after 2 secs
}

private Runnable mUpdateTimeTask = new Runnable() {
    public void run() {
        connectionControl.checkNetworkState();
        System.out.println("online?: " + connectionControl.isOnline());
        mHandler.postDelayed(this, 15000); // repeat every x/1000 secs
    }
};
</code></pre>

<p>My class <b>ConnectionControl</b> has a boolean, that gets set to either true or false whether my app can reach a specific http-host.
Now my question is: how can i achieve a automatic change on the ImageView in my Activity to display the boolean's value? 
I already looked at Observer-Pattern, EventListener, BroadcastReciever but I'm stuck at finding the right solution. 
Also, i want to use the listening in other Activities.</p>

<p>What has worked so far was starting/stopping the timer-thing for each activity and have the ImageView update inside the <b>run()</b> method. But my guess is, there has to be a way around the redundancy.</p>
