I'm new to java programming so I apologize for the possibly incorrect wording of the question. I have a boolean function updateEntryDB
that should return false if the response from my database is "Error" and true if it is "Success". How do I get the boolean response from the @override
method OnSuccessBool
, so that my updateEntryDB
function will return the proper response? Thanks for any help.
private boolean updateEntryDB(final String tag)
{
//Log.i(TAG, "updateEntryDB");
String np = numPlate.getText().toString();
dbWork dbWork = new dbWork();
dbWork.updateEntryTime(tag, np, requestQueue, new dbWork.VolleyCallback() {
@Override
public void onSuccess(String result) {
}
@Override
public boolean onSuccessBool(String result) {
String dbResponse = result;
test.setText(dbResponse);
String[] errSucc = dbResponse.split(":");
if(errSucc[0].equals("Error"))
{
return false;
}
else if(errSucc[0].equals("Success"))
{
return true;
}
return false;
}
});
}