Use more threading, Run intensive processes on the background thread, either AsyncTask or use this.
public Runnable NameOfRunnable = new Runnable()
{
@Override
public void run()
{
while (true)
{
// TODO add code to refresh in background
try
{
Thread.sleep(1000);// sleeps 1 second
//Do Your process here.
} catch (InterruptedException e){
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
};
then call
NameOfRunnable.start();
or
NameOfRunnable.run();
depends on what you want to do with it, either ui or just back ground info, plus callbacks will help do what you need to do