Tecnologia do Blogger.
RSS

[androidbrasil-dev] HttpGet não retorna o conteúdo correto

Pessoal,

Estou fazendo um Get e ele não me retorna o conteúdo correto.
O que eu recebo de retorno é um algo como:
Conectando ao Serviço...

Seria possível fazer algo como uma espera até que seja redirecionada para a próxima pagina ou estou enganado?

public static String getHistorico(Aluno a){
        String res= null;
        HttpClient httpClient = new DefaultHttpClient();
        HttpGet httpGet = new HttpGet(Constants.URL_HISTORICO+"?ctrl="+a.getCtrl()+"&sess=&opcao=6");

        try {
            ResponseHandler<String> responseHandler = new BasicResponseHandler();
            res= httpClient.execute(httpGet, responseHandler);       
            Log.d("Http Response:", res);

        } catch (ClientProtocolException e) {
            // writing exception to log
            e.printStackTrace();
        } catch (IOException e) {
            // writing exception to log
            e.printStackTrace();

        }
        return res;
    }







--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comentários:

Postar um comentário