You can put a callback in the constructor of your task to achieve this.
Pseudo code:
Create an interface like the following
public interface MyCallback {
public void onResult(String result);
}
Implement this interface somewhere in your code:
MyCallback callback = new MyCallback() {
@Override
public void onResult(String result) {
if(result.equals("Sucessfully Registered") {
// success
} else {
// not success
}
}
}
Pass this callback in the constructor of your task and store it as a local variable mCallback;
new BackgroundTask(callback).execute(...);
In your onPostExecute() method:
mCallback.onResult("<web service result String>");
Please note that the above has not been tested and might contain minor syntax errors. Good luck.