Is it OK to use previous Handler in Activity created before onDestroy() onPause()?
<p>Is it OK to reuse a Handler object in the next life of Activity which was previously created in its previous session (before onPause, onDestroy()) ?</p>

<p>Like I create a Handler in Activity propagate it to other objects elsewhere, the Activity dies or pauses, then comes to life again and use the old handler ? </p>

<pre><code>    // In the oncreate() method I have this code to recreate handler every time
    // Then I set the handler to a static Global object 
    // Other Objects use the global object's static method to get 
    //fresh handler every timebefore calling sendMessage()

        /**
     * Set up handler 
     */     
    Handler h = new Handler(new Callback() 
    {           
        public boolean handleMessage(Message msg) 
        {
            handleServiceMessage(msg);
            return true;
        }
    }); 


    uiglobal = new UIGlobals(h);
</code></pre>

<p>UiGlobals is declared as </p>

<pre><code> private static UIGlobals uiglobal = null;
</code></pre>

<p>Not sure if the above approach is correct ..</p>

<p>my GlobalUI class looks like this</p>

<pre><code>    public class UIGlobals 
    {
         private static Handler handler = null; 
         public UIGlobals(Handler h)
        {
            handler = h;
        }   
        public static Handler getHandler()
        {
            return handler;
        }    
    }
</code></pre>
