I decided to use the Web Service method to verify the login as follows:
if(envelope.bodyIn instanceof SoapFault) {
strFault = ((SoapFault) envelope.bodyIn).faultstring
}
And in try catch
where the method is called where the error of Exception
arrived I called a thread
with a toast
.
finally {
runOnUiThread(new Runnable() {
public void run() {
Toast.makeText(getApplicationContext(), ws.strFault, Toast.LENGTH_SHORT).show();
}
});
dialog.dismiss();
}