Adding rows to Google sheet on Android studios in few steps

Опубликовано: 27 Февраль 2022
на канале: Code Page
79
1

#AndroidStudios#AndroidDEvelopment#GoogleScripts#GoogleSheets

Thread th = new Thread(new Runnable() {
@Override
public void run() {

try {
String u = "";
URL url = new URL(u);
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("Content-Type", "application/json; utf-8");
con.setRequestProperty("Accept", "application/json");
con.setDoOutput(true);
try (BufferedReader br = new BufferedReader(
new InputStreamReader(con.getInputStream(), "utf-8"))) {
StringBuilder response = new StringBuilder();
String responseLine = null;
while ((responseLine = br.readLine()) != null) {
response.append(responseLine.trim());
}

}
catch(Exception e ){

}
} catch (Exception e) {

}
}
});
th.start();