I\'m at a bit of a loss as to how to send a jsonobject from my android application to the database
As I am new to this I\'m not too sure where I\'ve gon
Button submitButton = (Button) findViewById(R.id.submit_button);
submitButton.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
JSONObject postData = new JSONObject();
try {
postData.put("name", name.getText().toString());
postData.put("address", address.getText().toString());
postData.put("manufacturer", manufacturer.getText().toString());
postData.put("location", location.getText().toString());
postData.put("type", type.getText().toString());
postData.put("deviceID", deviceID.getText().toString());
} catch (JSONException e) {
e.printStackTrace();
}
}
});