I have a software made in processing that saves data in a local sercer ( using xampp) and I made an android app that gets data from Firebase.
Is it possible to have the Processing App to send the data to the firebase server?
here is some of the code for the network part of the Processing app.
void server_evaluation() {
Client client;
client = new Client(this, "127.0.0.1", 84);
String[] nomes = split(cp5.get(Textfield.class, "Name").getText(), " ");
String name = join(nomes, "_");
if (client.active()==true) {
println("connected");
// Make a HTTP request:
client.write("GET /database/add1.php?id=" + cp5.get(Textfield.class, "ID").getText() + "&nome=" + name + "&pron=" + int(abs(round(degrees(minangle3)))) + "&supi=" + int(abs(round(degrees(maxangle3)))) + "&fle=" + int(abs(round(degrees(minangle2)))) + "&ext=" + int(abs(round(degrees(maxangle2)))) + "&rad=" + int(abs(round(degrees(minangle1)))) + "&uln=" + int(abs(round(degrees(maxangle1)))) + "\r\n");
client.write("\r\n");
client.stop();
} else {
// if you didn't get a connection to the server:
println("connection failed");
}
}
void server_exercise() {
Client client;
client = new Client(this, "127.0.0.1", 84);
String[] nomes = split(cp5.get(Textfield.class, "Name").getText(), " ");
String name = join(nomes, "_");
if (client.active()==true) {
println("connected");
// Make a HTTP request:
client.write("GET /database/add2.php?id=" + cp5.get(Textfield.class, "ID").getText() + "&nome=" + name + "&pron=" + int(round(degrees(pronation))) + "&supi=" + int(round(degrees(supination))) + "&fle=" + int(round(degrees(flection))) + "&ext=" + int(round(degrees(extension))) + "&rad=" + int(round(degrees(radial))) + "&uln=" + int(round(degrees(ulnar))) + "\r\n");
client.write("\r\n");
client.stop();
} else {
// if you didn't get a connection to the server:
println("connection failed");
}
}
Thanks ;D