1
I’m trying to make a comeback getResponse. I can see the return with the System.out.println, but I can’t get the same feedback within the application.
HttpURLConnection conexao = (HttpURLConnection)url.openConnection();
            conexao.setDoOutput(true);
            BufferedReader in = new BufferedReader(new InputStreamReader(conexao.getInputStream()));
             String inputLine = "";
             while ((inputLine = in.readLine()) != null)
                 System.out.println(inputLine);
             lblStatus.setText(inputLine);
             String respostaenvio = SomenteNumeros(inputLine);
             double resposta = Double.parseDouble(respostaenvio);
             if(resposta > 100000){
                 System.out.println("Enviado");
             }else{
                 System.out.println("Não Enviado");
             }
             in.close();
             conexao.disconnect();
            }
Can you help me understand what’s wrong?
I need the information reply sent to determine whether an SMS has been sent.
On the line System.out.println(inputLine); prints exactly the code I need, but when I try to print this same code into a JOptionPane, for example, will not.
You want to set the value in inputLine and then display on the label?
– Laerte
What is that method
SomenteNumerosago?– Victor Stafusa
the Somentenumeros method changes the received value to only numbers, since in return, there are other characters.
– Wagner Fillio
Laerte, exactly that. set the value and display on a label or Joption
– Wagner Fillio