Timer not working properly in android mobile
<p>I have developed one application which do some task periodically. For that i have set one timer object with task in it. It works fine in the android emulator but as I deployed the same application on the Android Mobile, it shows 2-6 minutes delay everytime and do not work after day crosses.  Can someone please tell me the reason and remedy of the timer behaviour.
  Thanks in advance!</p>

<p>Code used </p>

<pre><code>private final Handler timerHandler = new Handler()
    {
        public void handleMessage(Message msg)
        {
            // Do main activity
        }
    };
Timer clockTimer = new Timer();
clockTimer.scheduleAtFixedRate(new Task(public void run()
        {
            timerHandler.sendEmptyMessage(0);
        }), StartTime,INTERVAL);
</code></pre>
