I have the following method:
public static boolean getIsUp()
{
String method = "isup.php";
AsyncHttpResponseHandler response = new AsyncHttpResponseHandler(){
@Override
public void onSuccess(String content) {
if(Integer.parseInt(content) == IS_UP_CONTENT)
//code to return true
else
//code to return false
}
};
get(method, null, response);
}
How would you fill the //code to return true and //code to return false so that the method return the appropriate response? Is that even possible?