View Single Post
  #2 (permalink)  
Old July 9th, 2014, 12:02 PM
Kees Kees is offline
Authorized User
Points: 89, Level: 1
Points: 89, Level: 1 Points: 89, Level: 1 Points: 89, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2013
Posts: 27
Thanks: 1
Thanked 0 Times in 0 Posts
Default Content Provider, LoaderManager

Hi,
I am not that familiar with this stuff but don't see an asynchronous loader here, as that restartLoader is called in a new thread.
At the end of onCreate in your main for instance :
Code:
    Thread t = new Thread(new Runnable() {
      public void run() {
    	  update(); 
      }
    });
    t.start();
  }
  
  Handler handler = new Handler();
  
  public void update() {
    handler.post(new Runnable() {
      public void run() {
    	  getSupportLoaderManager().restartLoader(0, null, this);
      }
    });
  }
Reply With Quote