I haven't worked with Volley myself, so I can't give you an answer if it's too advanced for what you want to achieve. In general when it comes to HTTP communication with a server I prefer to use AndroidAsyncHttpClient:
"An asynchronous callback-based Http client for Android built on top of Apache’s HttpClient libraries. All requests are made outside of your app’s main UI thread, but any callback logic will be executed on the same thread as the callback was created using Android’s Handler message passing."
Example relevant to what you want to do:
public class YourActivity extends Activity {
private void handleScannedBardcode(String barcode) {
// you need to make the request match the REST API you are using
RequestParams params = new RequestParams();
params.put("A_KEY_TO_IDENTIFY_THE_PARAMETER", barcode);
AsyncHttpClient client = new AsyncHttpClient();
client.post("http://www.yourserver.com", params, new AsyncHttpResponseHandler() {
@Override
public void onSuccess(String response) {
// you need to add parsing of JSON data to match the response
JSONObject jo = new JSONObject(response);
String productName = jo.getString("productname");
updateProductView(productName);
}
});
}
private void updateProductView(String productName) {
// you need to use a view id that corresponds to a textview in your layout xml
TextView tv = (TextView)findViewById(R.id.productName);
tv.setText(productName);
}
}
Depending on how complex the JSON response is you can either opt for GSON or Jackson for parsing of large amounts of JSON or plain JSONObject