Finally I did it. Here is the code I've added to get the task done.
In ProgUpAsync.java
public void setMainActivity(Activity paramActivity){
try{
mCallback = (MyThreadListener) paramActivity;
}catch(ClassCastException e){
throw new ClassCastException(paramActivity.toString() + " must implement MyThreadListener");
}
}
And in PUMainActivity.java
try{
if(progUpAsync.getStatus() == AsyncTask.Status.RUNNING){
if(PuConstants.debugEnable)Log.d(TAG, "# Async is RUNNING");
progUpAsync.setMainActivity(this);
}else{
if(PuConstants.debugEnable)Log.d(TAG, "# Async is NOT running");
progUpAsync = new ProgUpAsync(this);
progUpAsync.execute();
}
}catch(NullPointerException npe){
if(PuConstants.debugEnable)Log.w(TAG, "@ Exception caz of progUpAsync : " + npe);
progUpAsync = new ProgUpAsync(this);
progUpAsync.execute();
}