Boa Tarde, estou com um problema fiz todos os exercícios, e no momento que aperto o botão de enviar notas, o Toast aparece vazio. Fui no meu WebClient e ver se no try/catch gerou algo e tinha a seguinte mensagem
java.io.FileNotFoundException: https://www.caelum.com.br/mobile
segue meu código do Web Client
package com.example.des.agenda;
import java.io.IOException;
import java.io.PrintStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Scanner;
/**
* Created by des on 09/05/2016.
*/
public class WebClient {
public String Post(String json){
try {
URL url = new URL("https://www.caelum.com.br/mobile");
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestProperty("Content-type", "application/json");
connection.setRequestProperty("Accept", "application/json");
connection.setDoOutput(true);
PrintStream output = new PrintStream(connection.getOutputStream());
output.println(json);
connection.connect();
String resposta = new Scanner(connection.getInputStream()).next();
return resposta;
}catch (MalformedURLException e) {
e.printStackTrace();
}catch (IOException e) {
e.printStackTrace();
}
return null;
}
}