public void async(Activity act){
  if (act.isFinishing()) {
    AQUtility.warn("Warning","Possible memory leak. Calling ajax with a terminated activity.");
  }
  if (type == null) {
    AQUtility.warn("Warning","type() is not called with response type.");
    return;
  }
  this.act=new WeakReference<Activity>(act);
  async((Context)act);
}

public void async ( Activity act ) { if ( act . isFinishing ( ) ) { AQUtility . warn ( "Warning" , "Possible memory leak. Calling ajax with a terminated activity." ) ; } if ( type == null ) { AQUtility . warn ( "Warning" , "type() is not called with response type." ) ; return ; } this . act = new WeakReference < Activity > ( act ) ; async ( ( Context ) act ) ; }
starts the async process . if activity is passed , the callback method will not be invoked if the activity is no longer in use . specifically , isfinishing ( ) is called to determine if the activity is active .
