3
I’m having trouble calling a method from my webservice,this method I send the boleto by email to the user, for some reason it’s not working. I have a listview with all the boletos and the user selects which one he wants to see the details and in this Activity of details I have 3 functions that is to send the boleto by email, send type line of the boleto by sms or just show the line.
This is the onClick method I have in Activity of details. is missing something? for even the logs they show me.
@Override
public void onClick(View v) {
switch (v.getId()){
case R.id.enviaBoletoEmail:
Log.d("","ENVIANDO BOLETO test 1");
new Thread(new Runnable() {
@Override
public void run() {
WebService ws = new WebService();
Log.d("","ENVIANDO BOLETO teste 2");
try {
pessoaDao = new PessoaDao(databaseHelper.getConnectionSource());
Pessoa pessoa=new Pessoa();
pessoa= pessoaDao.queryForId(1);
try {
ws.enviarBoletoPDF(sequencia, pessoa.getEmail());
Log.d("","ENVIANDO BOLETO test 3");
} catch (IOException e) {
e.printStackTrace();
} catch (XmlPullParserException e) {
e.printStackTrace();
}
} catch (SQLException e) {
e.printStackTrace();
}
}
}).start();
break;